New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use window inside of tkinter #1360
Comments
No you cannot do that. I investigated it at some point, but did not find a solution. It might be possible though. |
def delete():
gui_win = Tk()
gui_win.withdraw() # remove the main TK window only show message box
gui_win.iconbitmap('icon.ico')
msg = messagebox.askquestion("Message", "Are You Sure Delete Password \t")
if msg =='yes':
print("Delete data")
gui_win.destroy()
gui_win.mainloop() |
Why is this code related, @MominIqbal-1234 ? |
Since it's a desktop application, not a web application, integrating Tkinter should be straightforward. :) import webview
from tkinter import *
from tkinter import messagebox
class Api():
def delete(self, value):
gui_win = Tk()
gui_win.withdraw() # remove the main TK window only show message box
msg = messagebox.askquestion("Message", "Are You Sure \t")
if msg =='yes':
print("Delete data")
gui_win.destroy()
gui_win.mainloop()
webview.create_window("Test", html="<button onclick='pywebview.api.delete(\"Woah dude!\")'>Delete</button>", js_api=Api())
webview.start() |
pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own native GUI window. Here why use the native gui window to instead of tkinter frame?? As we know, tkinter is a lightweight cross-platform gui too. @r0x0r |
hi, I find a project tkwebview2 which is based on the pywebview, and display the content on the tkinter frame. @r0x0r @PanosHatz |
Can I create a window using create_window and place it inside a frame of my tkinter app somehow?
In general, I am trying to create an app with a tkinter window divided in half where the left half will have a local PDF from my PC and the right half will have some buttons and fields
The reason I want this is because I need to embed a pdf in tkinter window with the ability to select text and copy/paste
The text was updated successfully, but these errors were encountered: