[Tutor] Tk -- which label clicked

Ron Weidner xecronix at yahoo.com
Thu Jul 14 20:37:21 CEST 2005

This doesn't work.  Not an error though. :)  What I'm
trying to do is get the text value of a label.

def icon_click(self, event=None):
  print event.widget.option_get("text", event.widget)

Or, more to the point...  I need to dynamicaly create
clickable labels, each using the same callback.  When
clicked, I need to know which one was clicked.  I was
hoping to use the "text" of the label as the argument
to another function.

Any ideas, suggestions, or recommeded URLs to study?

Ronald Weidner
PHP Software developer for hire.

Start your day with Yahoo! - make it your home page 

More information about the Tutor mailing list