У меня есть проблема. Я терпеть не могу стандартные окна Win-7, поэтому я решил их переделать под себя. Для этого я использую Tk.overridedirect(True). Я сделал закрытие окна, и его сворачивание в иконку.
Tk.withdraw()
Tk.overrideredirect(False)
Tk.wm_state('iconic')
как отследить открытие окна, что-бы сработал код:
Tk.overrideredirect(True)
The master for a widget must be another widget. You're passing a class , and a class isn't a widget. You can use an instance of the class, however.
Instead of this:
Form0 = MainForm()
Form1 = Form(MainForm)
do this:
Form0 = MainForm()
Form1 = Form(Form0)
Also, you should only call mainloop
once. You shouldn't call it for every window.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.