[Tkinter-discuss] divergent behaviour

Michael Lange klappnase at web.de
Mon Jun 23 20:36:33 CEST 2014


On Mon, 23 Jun 2014 11:15:43 +0100
Alan Gauld <alan.gauld at btinternet.com> wrote:

> The parent is the main Tk window.
> The evEdit doesn't use the event in any way.
> 
> Here are the construction lines and the event function...
> 
> class TerritoryWindow(tk.Frame):
>      def __init__(self, parent):
>         tk.Frame.__init__(self,parent)
> ...
> 
>         self.eventlist = tk.Listbox(self.history,
>                                     width=45, font=('mono','10', ''))
>         self.eventlist.bind('<ButtonRelease-1>', self.eventSelect)
>         self.eventlist.bind('<Double-1>',self.doEdit)
> ...
>         self.editEvent = tk.Button(self.eventbuttons, text="Edit",
>                                    command=self.doEdit)
> 
> 
>      def doEdit(self, ev=None):
>         event = self.eventlist.get(self.eventlist.curselection()).split
> () me = MapEntry(self, event)
>         data.updateEvent((self.eventID,) + me.result)
>         self.showEvents()
> 
> 
> MapEntry is the editing dialog box.

I cannot see anything that looks critical here, how do you calculate the
Toplevel's coords in the MapEntry class?


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Many Myths are based on truth
		-- Spock, "The Way to Eden",  stardate 5832.3


More information about the Tkinter-discuss mailing list