ANN: Thinking in Tkinter
gmuller at worldonline.nl
Thu Sep 12 22:20:37 CEST 2002
"Russell E. Owen" <owen at nospam.invalid> schreef in bericht
news:alqiue$1ejo$1 at nntp6.u.washington.edu...
> True. It would help if the command callback sent an arguement that
> identified the widget (making it look a bit more like an event binding).
> In any event, it doesn't and command is unfortunately still the best way
> to handle button widgets.
In a recent thread it was pointed out that you can also bind to s function
of a specific object instance. Out of the top of my head:
def printarg( self, arg ):
anA = a()
functionBoundToInstance = anA.printarg
this would work also for widgets, command = aWidget.activate
Sorry didnot try it out yet :-)
More information about the Python-list