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 CLOSED
 
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....

Thanks
__________________
Hugh Macdonald
nvizible
 
  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.

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

Thanks
__________________
Hugh Macdonald
nvizible
 
  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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 03:00 AM.


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