Catching UI control changes...


I’ve got a control in my UI (it’s an optionMenuGrp), and I want to be able to catch when it is changed and modify the UI accordingly…

Basically, if the optionMenuGrp is on one setting, I want some UI options disabled, and if it’s on another, I want them enabled…

Any way to do this? Is there a function that’s called when something is changed (if it exists) - like a listener class in Java…



The solution is a flag that is available to the optionMenuGrp command itself.

optionMenuGrp -c “doThisProcWhenTheMenuChanges”;

One thing I like to do is first make my optionMenuGrp as such:

string $myPopUp = optionMenuGrp -blah "blah" -stuff "stuff" "myPopUpMenuName";

And then edit that with my command and include the name of the menu as an arguement to the proc being called by the menu’s change command, like this:

optionMenuGrp -e -cc (“doThisProc " + $myPopUp”);

This lets me create doThisProc so that it can potentially evaluate any menu whose name I pass it. Extra food for thought.



ahh - wonderful - that was exactly what I was after!



This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.