Catching UI control changes...

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  03 March 2003
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....

Hugh Macdonald
  03 March 2003
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.

  03 March 2003
ahh - wonderful - that was exactly what I was after!

Hugh Macdonald
  01 January 2006
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:43 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.