By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,378 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

pass an event up to parent widget

P: n/a
I have a Tkinter (frame) widget that contains several other frame
widgets, each containing entry widgets. In the parent frame I have a
'save' button that is initially disabled. As it is now, each widget has
a hasChanged property that I can poll to see if updates to the source
data need to be made. hasChanged is set to True by an event routine in
each frame widget, and this works fine for my exit routine which knows
to poll each widget for hasChanged. What I don't know how to do is send
an event up the chain to the top so it can change the 'save' button to
NORMAL (telling the user 'The data has been changed and can be saved if
wanted') . I donít think bind_class() to all entry widgets is the way
to go. I could create an after() alarm callback to poll hasChanged, but
again this seems to awkward. I have looked at widget.event_add() but,
don't know if this is viable. I am thinking a virtual event without any
SEQUENCE, and then triggering it programmatically (from within the
sub-widget event handlers). Is that doable? Isn't there a better way?
Any suggestions?
Bill
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.