Reputation: 299
I have a desktop application that uses WindowedApplication with several DropDownLists in the title bar. I need to move the DropDownLists to the right, but can't seem to figure out how. The way the project is set up is that they WindowedApplication is actually an Extension of the spark WinowedApplication class, so everything is in an action-script file, and not an mxml file. I've been thrown into a Flew project for work, so I'm not allowed to be too specific with code. Sorry if this isn't enough information, I'm very new to Flex.
Upvotes: 0
Views: 45
Reputation: 444
Put all your dropdownlists in a HGroup container and set the horizontalAlign of your HGroup to "right"
Solution 1: with mxml (add this hgroup to your toolbar )
<s:HGroup id="dropDownListsContainer" width="100%" height="20" horizontalAlign="right" verticalAlign="middle">
<!-- add your dropdownlists here-->
<s:DropDownList id="dropDownList1"/>
<s:DropDownList id="dropDownList2"/>
<s:DropDownList id="dropDownList3"/>
<s:DropDownList id="dropDownList4"/>
</s:HGroup>
Solution 2: with AS3
var dropDownListsContainer:HGroup = new HGroup();
dropDownListsContainer.horizontalAlign = HorizontalAlign.RIGHT;
//Add your dropDownLists to the Hgroup
dropDownListsContainer.addElement(dropDownList1);
dropDownListsContainer.addElement(dropDownList2);
dropDownListsContainer.addElement(dropDownList3);
dropDownListsContainer.addElement(dropDownList4);
//Add your HGroup to your toolbar "myToolbar"
myToolbar.addElement(dropDownListsContainer);
Upvotes: 1