Here's what I use for dropdowns and accompanying static text: HarbsUI.DropdownGroup = function(container,dropdownLabel,dropdownList,selectedIndex,labelWidth,ddWidth,height){ var group = container.add('group'); container.spacing=0; group.spacing=0; group.orientation = 'row'; group.alignChildren = 'top'; if(height){group.maximumSize.height = height} group.margins=0; group.group = group.add('group'); group.group.orientation = 'column'; group.group.alignChildren = 'right'; group.group.margins = 0; group.group.spacing=0; if(labelWidth){group.group.preferredSize.width = labelWidth} group.label = group.group.add('statictext',undefined,dropdownLabel); group.label.margins = 0; group.dropdown = group.add('dropdownlist',undefined,undefined,{items:dropdownList}); group.dropdown.margins = 0; if(selectedIndex != undefined){ group.dropdown.selection = selectedIndex; } if(ddWidth){group.dropdown.preferredSize.width = ddWidth;} group.dropdown.name = group.label; return group.dropdown; } And to use it you just do something like this: hdrStyleDD = new HarbsUI.DropdownGroup(myColumn,myLabel,myStringList,listIdx,80,100,24);
... View more