0

我正在用 ExtendScript 编写脚本,并且需要在选项卡内的面板上有大量复选框,我无法将面板分成组,因为我需要获取组的长度属性。我想知道是否有人在尝试在 ScriptUI 中使用带有选项卡式面板的手动布局时遇到过问题。有没有办法手动对齐标签面板的子项?这是一个没有标签的示例:

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(); 
    }

这是一个带有标签的示例:

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(); 
    }   

无标签的面板 带标签的面板

4

0 回答 0