Hi -
I looked into this, and I think the easiest thing to do would be to catch
the combobox's open() event and manually move the dropdown over by changing
the dropdown's x,y positions. Something like the following code below. Note,
you might have to throw a doLater() call in there to delay the animation a
bit.
<mx:ComboBox id="myComboBox" dropdownWidth="180" open="modifyCB();">
<mx:dataProvider>
<mx:Array>
<mx:String>foo</mx:String>
<mx:String>foo</mx:String>
<mx:String>foo</mx:String>
<mx:String>foo</mx:String>
</mx:Array>
</mx:dataProvider>
</mx:ComboBox>
<mx:Script>
function modifyCB(){
myComboBox.dropdown.setStyle('textAlign', 'right');
myComboBox.dropdown.x-= 25;
}
</mx:Script>
Of course, the easiest thing to do would be to make your ComboBox the same
width as the dropdown and simply textAlign the items to the right. This
would make the component look more balanced too. But both ways work as you
would want.
Thanks,
Deepa
Flex Team
-----Original Message-----
From: johny_bravo_78 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 9:11 AM
To: [email protected]
Subject: [flexcoders] Any way to align the dropdown in a combobox to the
opposite edge?
because that would be useful if your combobox is at the right edge of
the page and you want it to be wider than the combobox.
Yahoo! Groups Links