[Tkinter-discuss] Dialog placement relative to main window or frame
Michael Lange
klappnase at web.de
Sun Aug 13 02:06:52 CEST 2006
On Sat, 12 Aug 2006 17:13:53 -0400
Jeff Cagle <jrcagle at juno.com> wrote:
> Hi all,
>
> I'm just learning, so I apologize in advance for a possibly dumb
> question. I want to create an interface that has info at the top,
> buttons down the left side, and then a large space on the bottom right.
> When the user presses a button, the appropriate dialog box pops into the
> large space. I believe I want a dialog, rather than a simple frame, in
> order to be able to have a nice title bar, make use of the "Close"
> button, etc.
>
> Problem: How can I configure the dialog box so that it moves if the main
> window also moves? I thought I might use an event trigger, somthing like:
>
> mainw.bind("<When-I-Move>",func=mydialog.reconfig)
> ...
>
> def mydialog.reconfig(event):
> get coords of mainw
> set new coords of mydialog
>
>
> However, I can't find a "When the window moves" event in the docs.
>
Hi Jeff,
the '<Configure>' event seems to do what you want (at least on my linux box
with IceWm).
I hope this helps
Michael
More information about the Tkinter-discuss
mailing list