There's more...

Bear in mind that to keep the focus of the second window when the dialog is displayed, we have to pass the reference to the top-level instance, the parent option, to the dialog function:

if mb.askyesno(message=message, parent=self):
self.destroy()

Otherwise, the dialog will take the root window as its parent, and you would see that it pops over the second window. These quirks may confuse your users, so it is a good practice to correctly set the parent of each top-level instance or dialog.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset