OOing in Tkinter - help

Henry Baumgartl h.baumgartl at chello.NOSPAM.nl
Thu Oct 10 16:01:14 CEST 2002

Thank you Paul,

Works great, and by binding the accelerator keys to bind_class - Text, i
suppose there will be little fear of disaster.

Best Regards,

"Paul Simmonds" <psimmo60 at hotmail.com> schreef in bericht > You can use the
event object that's created in the call. Swap your specific
> text widget call for the calling widget so the code becomes:
> def onSelectAll(self, event=None):
>     event.widget.tag_add(SEL, '1.0', END+'-1c')
>     event.widget.mark_set(INSERT, '1.0')
>     event.widget.see(INSERT)
>     ...
> The event object contains a lot of data on the calling widget. If this
> function is never called from anything other than a text widget (which it
> doesn't look like it will) then there'll be no problems.
> HTH,
> Paul

More information about the Python-list mailing list