Reputation: 52911
I have a Toplevel widget I'd like it so that it would never appear within the confines of the main Tk window. Basically so that when the Toplevel appears it doesn't cover up any of the main Tk window.
Upvotes: 1
Views: 383
Reputation: 385900
You want to use wm_geometry and a tiny bit of math to calculate and set a suitable starting position for the second toplevel.
Upvotes: 1
Reputation: 556
You could just set up a separate toplevel, cf:
self.newwindow = Toplevel(self)
self.newwindow.title('New Window')
and then embed the widget in the separate toplevel.
Upvotes: 0