How to open a window not running on chrome?

Joined
Nov 15, 2022
Messages
1
Reaction score
0
im trying to learn how to code an application window like this image (not running on chromium, but just a floating window with a site inside, which I'll get to on my own)
1668475981770.png


is there a way to do this in ruby? I've been searching everywhere for answers but can't seem to get any.
 
Joined
Mar 5, 2023
Messages
36
Reaction score
12
Yes, you can create an application window like the one in the image using Ruby and a graphical user interface (GUI) framework such as Tk or Shoes.

Here's an example code snippet using Tk to create a window:

Ruby:
require 'tk'

# Create a root window
root = TkRoot.new do
  title "My Application"
  geometry "800x600" # Set the size of the window
end

# Create a frame to hold the web view
frame = TkFrame.new(root)

# Create a web view widget using the Tk::Tile extension
web_view = Tk::Tile::Web.new(frame) do
  height 550
  width 750
end

# Set the URL of the webpage to display
web_view.set_url("https://www.example.com")

# Add the web view widget to the frame and pack it
web_view.pack(side: 'top', fill: 'both', expand: true)
frame.pack(side: 'top', fill: 'both', expand: true)

# Start the main event loop
Tk.mainloop

This code creates a root window with a specified size, and adds a frame and web view widget to it using the Tk::Tile extension. The web view is then set to display a specified URL. Finally, the main event loop is started to display the window.

Keep in mind that this is just a basic example and you'll need to add your own customizations and functionality to fully create your application window.

hope this answers your question. feel free to ask any follow ups.
 
Joined
Nov 23, 2023
Messages
54
Reaction score
2
im trying to learn how to code an application window like this image (not running on chromium, but just a floating window with a site inside, which I'll get to on my own)
View attachment 2348

is there a way to do this in ruby? I've been searching everywhere for answers but can't seem to get any.
Are you trying to open a web page in a different browser than Chrome? If so, open the desired browser (e.g., Firefox, Edge, Safari) and navigate to the website address
 
Joined
Nov 23, 2023
Messages
54
Reaction score
2
im trying to learn how to code an application window like this image (not running on chromium, but just a floating window with a site inside, which I'll get to on my own)
View attachment 2348

is there a way to do this in ruby? I've been searching everywhere for answers but can't seem to get any.
You can open other web browsers besides Chrome, such as Firefox, Edge, Safari, or Opera. Each browser has its own icon that you can click on to open it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top