PDA

View Full Version : Catching UI control changes...


Hugh
03-26-2003, 11:21 PM
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....

Thanks

bigfatMELon
03-27-2003, 04:28 AM
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.

-jl

Hugh
03-27-2003, 11:14 AM
ahh - wonderful - that was exactly what I was after!

Thanks

CGTalk Moderation
01-14-2006, 06:00 PM
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.