Python Tkinter - Edit external object within event handler?

Posted by M3RPHY on Stack Overflow See other posts from Stack Overflow or by M3RPHY
Published on 2010-04-18T02:28:15Z Indexed on 2010/04/18 2:33 UTC
Read the original article Hit count: 611

Filed under:
|
|
|
|

Hey all,

As the title says, I'm grabbing the cursor location within a motion triggered event handler in Tkinter. I'd like to update an existing label widget with the location, however I cannot for the life of me figure out how to edit the label's text field (or any external object for that matter) within the event handler. From what I understand, event is the only argument passed to the handler, which means I can't pass the label object. How do I access objects outside of the handler?

Apologize for the noobish question as I'm a C programmer new to Python. Thanks!

© Stack Overflow or respective owner

Related posts about python

Related posts about tkinter