[Tkinter-discuss] Control position of Tkinter common dialogs?
Matt Keenan
matt.keenan at oracle.com
Wed Oct 27 14:27:28 CEST 2010
Malcolm,
Nice idea, but unfortunately don't work... tkinter appears to be smart
enough to ensure you cannot place a dialog outside the bounds of the
root display size.
Using negative values, positions dialog initially at 0,0.
Using massive positive values, positions dialog bottom right of screen.
Still looking for a nice solution :-)
cheers
Matt
On 10/27/10 12:07 PM, python at bdurham.com wrote:
> Hi Matt,
>
>> I have a similar issue, however not for common dialogs but for a custom
> toplevel transient dialogs. As you create your dialog it's dimensions
> are not known until all idletasks have completed for child widgets being
> added to the dialog.
>
> Disclaimer: I'm new to Tkinter development so take this untested idea
> with a grain of salt ...
>
> Have you tried positioning your toplevel window off screen (negative
> coordinates) so that it can be fully rendered (and you can capture its
> dimensions after all layout calculations have completed), then center
> your window afterwards?
>
> If you come up with a working solution, I would love to hear about it.
> I'll do the same from my end.
>
> Malcolm
More information about the Tkinter-discuss
mailing list