Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello Monks I need to monitor if a new element has been programmatically added to a Listbox. If a new element has been added, a subroutine should be called. Since I am not aware of any callback for this, in the script below, I try to use programmatically select a Listbox element with selectionSet (whenever a new element is added) in order to let the <<ListboxSelect>> call a subroutine. The approach does not work, since <<ListboxSelect>> seems to be called only if a Listbox element is selected by the user. Using <<Modified>> does not work too. Any suggestion on how I could solve this?
EDIT The code above is in Perl/Tk and not in Tcl::Tk simply because I was looking for a solution independently of Tcl::Tk, as I thought a callback triggered by a state change in the Listbox was easier/possible to achieve then working on the Tcl bridge to Perl through Tcl::Tk (or the similar Tcl::pTk) In reply to Tk (Tcl::Tk) programmatically monitor change in Listbox by IB2017
|
|