PDA

View Full Version : floatSliderButtonGrp strange behaviour ...


Octagon
06-11-2003, 03:59 PM
hi there,

i noticed something strange when using "floatSliderButtonGrp". it doesnt seem to work they way it should. can someone tell me what im doing wrong?

Heres the code, look at the comments in upper case to see what i mean.

cheers,
matthias


{
if (`window -exists test`)
deleteUI test;

window test;
columnLayout -adj 1 -cat "both" 0;
colorSliderButtonGrp
-l "Color"
-rgb 1 0 0
-buttonLabel "Reset"
-symbolButtonDisplay 0 // no map texture button
-columnWidth 1 $uiCenter
-columnWidth 2 60
-columnWidth 3 30 // ADJUSTABLE SLIDER
-columnWidth 4 150 // ADJUSTABLE BUTTON
-cw 5 38
;

text -l "" -h 5;

floatSliderButtonGrp
-label "Scale"
-field 1
-buttonLabel "Reset"
-symbolButtonDisplay 0
-columnWidth 1 $uiCenter
-columnWidth 2 60
-columnWidth 3 30 // BUG?: SLIDER DOESNT DISPLAY CORRECTLY
-columnWidth 4 150 // BUG?: BUTTON CANNOT BE ADJUSTED
;

setParent ..;

showWindow;
}

dwalden74
06-12-2003, 11:17 AM
Controlling the alignment, width etc of the Grp controls can admittedly be quite a hassle at times. This can be influenced as well by the limitations of their parent controls, and tracking down the right flag in the right control can often lead to quite a bit of frustration.

I tried your example and saw the results you were getting. It seems that column 3 in the floatSliderButtonGrp cannot be resized very easily. One option is to change the "-columnWidth 3" flag to a value around 160. This works fine for me. Another option for you would be to split the group control into individual controls (maybe you could even use a floatSliderGrp together with a button?).

Sorry I can't be of more help!

:beer:
David

Octagon
06-13-2003, 08:25 AM
Originally posted by dwalden74
and tracking down the right flag in the right control can often lead to quite a bit of frustration.

Exactly.

One option is to change the "-columnWidth 3" flag to a value around 160. This works fine for me. Another option for you would be to split the group control into individual controls (maybe you could even use a floatSliderGrp together with a button?).

Yes, of course I can build it individually :) It's just a tad annoying to see how the one grp command is implemented correctly and the next isnt. One should think such closely related commands as intSliderGrp and floatSliderGrp should work identically (their code might be even related or inherited off of the same class)


Sorry I can't be of more help!
:beer:
David

You did help me! I just wanted to check whether I'm doing something silly in my scripts (not using so much control grp anymore for the reasons above)

matthias

CGTalk Moderation
01-15-2006, 08:00 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.