Manual Layout of children of a Tabbed Panel in ScriptUI

582 Views Asked by At

I'm writing a script in ExtendScript and need to have tons of checkboxes on a panel inside a tab, I can't split the panel into groups because I need to get the length property of the group. I was wondering if anyone had experienced an issue with trying to use manual layout with Tabbed panels in ScriptUI. Is there a way to align children of a tab panel manually? Here's an example without tabs:

function MakeaPanel(this_obj_) { 
var pan = (this_obj_ instanceof Panel) 
? this_obj_ 
: new Window('palette', 'MainWindow',[449,210,831,576]); 

        CheckBGroup = pan.add('panel', [33,46,350,145], 'CheckBoxGroup', {borderStyle: "etched"}); 
        ChkBox_1 = CheckBGroup.add('checkbox', [18,21,162,41], 'CheckBox1'); 
        ChkBox_1.value = false; 
        ChkBox_2 = CheckBGroup.add('checkbox', [18,43,162,63], 'CheckBox2'); 
        ChkBox_2.value = false; 
        ChkBox_3 = CheckBGroup.add('checkbox', [142,21,286,41], 'CheckBox3'); 
        ChkBox_3.value = false; 
        ChkBox_4 = CheckBGroup.add('checkbox', [142,43,286,63], 'CheckBox4'); 
        ChkBox_4.value = false; 

        return pan 
    } 
var w = MakeaPanel(this); 
if (w.toString() == "[object Panel]") { 
w; 
} else { 
w.show(); 
    }

And Here's an example with Tabs:

function MakeaPanel(this_obj_) { 
var pan = (this_obj_ instanceof Panel) 
? this_obj_ 
: new Window('palette', 'MainWindow', undefined); //  [449,210,831,576]

                var tpanel = pan.add ("tabbedpanel");
                var MainTab = tpanel.add ("tab", undefined, "Main");                
                var OptionsTab = tpanel.add ("tab", undefined, "Options");
                var OT_Panel = OptionsTab.add ("panel", undefined, "");

        CheckBGroup = MainTab.add('panel', [33,46,350,200], 'CheckBoxGroup', {borderStyle: "etched"}); 
        ChkBox_1 = CheckBGroup.add('checkbox', [18,21,162,41], 'CheckBox1'); 
        ChkBox_1.value = false; 
        ChkBox_2 = CheckBGroup.add('checkbox', [18,43,162,63], 'CheckBox2'); 
        ChkBox_2.value = false; 
        ChkBox_3 = CheckBGroup.add('checkbox', [142,21,286,41], 'CheckBox3'); 
        ChkBox_3.value = false; 
        ChkBox_4 = CheckBGroup.add('checkbox', [142,43,286,63], 'CheckBox4'); 
        ChkBox_4.value = false; 

        return pan 
    } 
var w = MakeaPanel(this); 
if (w.toString() == "[object Panel]") { 
w; 
} else { 
w.show(); 
    }   

Panel Without Tab Panel With Tabs

0

There are 0 best solutions below