On 23/06/14 10:00, Michael Lange wrote:

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()?

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.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to