OOing in Tkinter - help

Henry Baumgartl h.baumgartl at chello.NOSPAM.nl
Thu Oct 10 00:11:19 CEST 2002


Hello All,

Still struggling with UI programming.

To get uniformity in key binding, i use little methods to call like:

def onSelectAll(self, event=None):
    self.textfield.tag_add(SEL, '1.0', END+'-1c')
    self.textfield.mark_set(INSERT, '1.0')
    self.textfield.see(INSERT)

etc. However, now i need more than one Text widget in the same container
frame, and it seems a waste re-writing the methods to work with each widget.

How can i adjust the above so it will respond to whatever text widget the
call comes from. I'm quite sure it can be done, after all, Tkinter text and
entry widgets already have lots of hot-keys activated.

Your help will be greatly appreciated!

Best Regards,
Henry

Please, remove NOSPAM. from my address, when responding directly





More information about the Python-list mailing list