View Full Version : layerButton -color ??

01 January 2008, 08:07 AM
Hey guys,

I was trying to ceate some UI using layerButton, somehow can't seems to set the color on layerButton UI control. It will work if I create a layer and set the layer to the control but I don't want to create a layer with it.

layerButton -label "myLabel" test;

//then when I try to set the color it doesn't work?
layerButton -edit -color 0 1.0 0 test;

any thoughts ?

01 January 2008, 01:21 AM
I don't know if it will help but I use to have problems with -bgc flag when creating color for UI window so I declare a variable first and apply it as a value.

float $r = 1;
float $g = 0;
float $b = 0;

button -bgc $r $g $b;

will return red button. Try it and let us know how it goes

01 January 2008, 02:01 AM
Base on your post, the problem you are having is you need to indicate whether the layer color is visible or transparent.

Try this

//set transparent to 0
layerButton -edit -transparent 0 test;
//then edit your color
layerButton -edit -color 0 1.0 0 test;

CGTalk Moderation
01 January 2008, 02:01 AM
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.