-
Hide or show GUI parts
Hi! I’m really stuck on this one.
What I want to do is, under my help-windows, be able to hide or show different parts of my GUI script.
So far I have bin able to show and hide (by looking on this thread: https://forums.creativecow.net/thread/227/22849 ) but the space that the button occupied is still there. What I want is for everything under to move up so the whole GUI becomes smaller.This is how my code looks like right now:
var res =
"group {
orientation:'column', alignment:['fill','fill'], alignChildren:['left','top'], spacing:[20,20,20,20], margins:[0,0,0,0],
strt: Group {
orientation:'row', alignment:['fill','top'], spacing:[0,0,0,0],
LWbutton: Button { text:'Apply Linear Wipe', alignment:['fill','left'], preferredSize:[110,25]},
Gbutton: Button { text:'Apply Grid', alignment:['fill','center'], preferredSize:[70,25] },
Hbutton: Button { text:'?', alignment:['right','right'], preferredSize:[25,25] },
},
optsRow: Panel{text:'Cut at:',
orientation:'column', alignment:['fill','top'],
text_input: EditText { text:'50', alignment:['fill','top'], preferredSize:[100,20] },
},
cmds: Group {
alignment:['fill','top'], margins:[0,5,0,0],
okButton: Button { text:'Cut!', alignment:['fill','center'] },
vCheck1: Checkbox {text:'hide1'},
vCheck2: Checkbox {text:'hide1'},
},
}";my_palette.grp.strt.LWbutton.onClick = onLWClick; //Liniar Wipe button on click
my_palette.grp.strt.Gbutton.onClick = onGClick; //Grid button on click
my_palette.grp.strt.Hbutton.onClick = helpWindow; //Help button on click
my_palette.grp.cmds.vCheck1.onClick = function ()
{
if (my_palette.grp.cmds.vCheck1.value == true) {
my_palette.grp.optsRow.visible = 0;
}else{
my_palette.grp.optsRow.visible = 1;
}}