[Python] tkinter popup
Mar 27, 2007 at 10:05 am
I cant figure out how to disable resizing of my popup window?
How to put this popup window to show in the middle of my text editor?
It is writen with Toplevel.
: myPopupWindow.wm_resizable(0, 0) It may or may not make resize controls disappear depending on your platform and/or window manager. But the resizing will be impossible in any case. A bit trickier. For example (untested): myPopupWindow.after_idle(centerPopupWindow) with: def centerPopupWindow(): x, y = editorWindow.winfo_rootx(), editorWindow.winfo_rooty() w, h = editorWindow.winfo_width(), editorWindow.winfo_height() ww, hh = myPopupWindow.winfo_width(), myPopupWindow.winfo_height()
: thanks for both replay, they are very helpful. specially this one, it will took some times for me to figure this. i was completely forgot that this can be done like that thx
Tkinter popup menu
Making a second window with Tkinter
cut & paste text between tkinter widgets
Tkinter, Alt, and Windows
how to change the text in the title bar of the Tkinter windows
Tkinter: closing a popup menu by clicking elsewhere
Tkinter: modal ok in windows, but not in Linux
os.system and unicode arguments fail on Win32
Tkinter: a widget within a menu(item)
Problems with Tkinter and menus
1 of 3
Mar 27, '07 at 10:05a
Mar 27, '07 at 1:20p
2 users in discussion
Eric Brunel (1)
Groups & Organizations
site design / logo © 2022 Grokbase