Browser within Customtkinter #1423
Unanswered
RAHULFROST7
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@RAHULFROST7 Every tkinter related library can be used with customtkinter. import tkinterweb # pip install tkinterweb
import customtkinter as ctk
def open_website():
response = ctk.CTkInputDialog(text="Enter website name")
website = response.get_input()
web_frame.load_website(website) # load any website
root = ctk.CTk()
root.title("CTkBrowser")
frame = ctk.CTkFrame(root)
frame.pack(fill="both", expand=True, padx=30, pady=30)
label = ctk.CTkButton(frame, text="CUSTOMTKINTER BROWSER", command=open_website)
label.pack(fill="both", pady=10, padx=20)
web_frame = tkinterweb.HtmlFrame(frame)
web_frame.load_website("www.google.com") # load the website
web_frame.pack(fill="both", expand=True, padx=10, pady=10)
root.mainloop() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
import tkinter as tk
import webview
root = tk.Tk()
root.geometry("800x600")
Create a new web browser window
browser = webview.create_window("My Browser", "https://www.google.com")
Run the main event loop
webview.start()
root.mainloop()
as you can see i can integrate browser using tkinter but i cant with customtkinter ....what should i do
Beta Was this translation helpful? Give feedback.
All reactions