Replies: 2 comments 1 reply
-
That's strange. You're right, it should work as written, though I've never seen it used in this way. What are you trying to achieve? Typically this method is implemented as in the example below in order to create a local event loop that waits for a window or widget to be destroyed before continuing. import ttkbootstrap as ttk
app = ttk.Window()
def show_my_popup():
top = ttk.Toplevel(title="top")
top.wait_window()
print("Hello world")
ttk.Button(app, text="Show popup", command=show_my_popup).pack()
app.mainloop() In your example, you are creating a local event loop before the main event loop has even been called. So, I'm not sure why it should work conceptually, even though it does with regular tk. I'll look into it, but from what I can tell, this method still works when implemented in a way such as what I've used above when the |
Beta Was this translation helpful? Give feedback.
-
Strange. For me it works just fine if I use the |
Beta Was this translation helpful? Give feedback.
-
@israel-dryer
import ttkbootstrap as ttk
if name == 'main':
Beta Was this translation helpful? Give feedback.
All reactions