Hi Alan, On Sun, 22 Jun 2014 23:18:31 +0100 Alan Gauld <alan.ga...@btinternet.com> wrote:
(...) > I have a form with a list box and a set of buttons. > When you highlight a list item you can press the > Edit button and it calls evEdit() which opens an > edit dialog in the centre of the parent window. > > However I also bound the double click event to evEdit and > if you double click the same item it opebns the dialog > in the centre of the screen. > > Does anyone know why double-click and button versions > of the same method result in different locations? I'm > assuming that somehow the dialog (TopLevel widget) sees > the screen as its parent in one version but the > original window as parent in the other - maybe...? > > PS. > If necessary I'll try to produce a short example to > illustrate, but the existing code is over 500 lines > so a tad too long to post. is it possible to post only the evEdit() function? Without that I can only guess, maybe the use of event.widget there causes confusion? Is the parent window the Tk() window or another Toplevel()? Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. I'm frequently appalled by the low regard you Earthmen have for life. -- Spock, "The Galileo Seven", stardate 2822.3 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss