Tabbed Panel
Data.defaultRButtonValue = true;
Data.defaultEditText = "EditText Example";
function DW_ScriptName_buildUI(thisObj) {
var pal = (thisObj instanceof Panel) ? thisObj :
new Window("palette", Data.scriptName, undefined, {resizeable:true});
if (pal != null) {
var tpanel =pal.add ("tabbedpanel");
tpanel.alignChildren = ["fill", "fill"];
tpanel.preferredSize = [350,300];
////////////// FIRST TAB
var firsttab = tpanel.add ("tab", undefined, "First Tab")
firsttab.alignChildren = "fill";
var firsttab_options = firsttab.add ("panel", undefined, "Options");
firsttab_options.alignChildren = "left";
firsttab_options.orientation = "column";
firsttab_options.firstgroup = firsttab_options.add ("group");
firsttab_options.firstgroup.alignChildren = "left";
firsttab_options.firstgroup.alignment = ['left','center'];
firsttab_options.firstgroup.orientation = "row";
firsttab_options.firstRButton =
firsttab_options.firstgroup.add ("RadioButton", undefined, "1st Radio Button:");
firsttab_options.firstRButton.alignment = ['left', 'center'];
firsttab_options.secondRButton = firsttab_options.firstgroup.add ("RadioButton", undefined, "2nd Radio Button:");
firsttab_options.rButtonAddToShapeLayer.alignment = ['left', 'center'];
firsttab_options.firstgroup.value = Data.defaultRButtonValue;
firsttab_options.textGroup = firsttab_options.add ("group");
firsttab_options.textGroup.alignChildren = "left";
firsttab_options.textGroup.alignment = ['left','center'];
firsttab_options.textGroup.orientation = "row";
firsttab_options.statictext = firsttab_options.textGroup.add ("StaticText", undefined, "StaticText To Display");
firsttab_options.textGroup.alignment = ['left','center'];
firsttab_options.editabletext = firsttab_options.textGroup.add ("EditText", undefined, Data.defaultEditText);
firsttab_options.editabletext.characters = 27;
// Workaround to ensure the edittext text color is black, even at darker UI brightness levels
var winGfx = pal.graphics;
var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
//firsttab_options.shapeName.foregroundColor = darkColorBrush;
pal.layout.layout(true);
pal.layout.resize();
pal.onResizing = pal.onResize = function () {this.layout.resize();
}