combobox display values on top and change color

hi guys

I have a ComboBox like this
<mx:ComboBox color = 'black' enabled="true" >
            <mx:dataProvider>                   
                  <mx:Array>
                        <mx:String>Project</mx:String>       
                        <mx:String>Work Name</mx:String>
                        <mx:String>User Id</mx:String>
                        <mx:String>User Name</mx:String>
                  </mx:Array>                   
            </mx:dataProvider>
      </mx:ComboBox>      

I have 2 requirments
1.when the combobox is clicked i want the values to display on the top.
By default when combobox is clicked the values are displayed down.
Anyway to change that to display on top?

2.How can i change the background color of the individual elements in the drop-down?

thanks.

royjaydAsked:
Who is Participating?
 
dgofmanCommented:
Look, bookmark this URL and you don't expert help in the future about CSS styling :)

http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html
0
 
dgofmanCommented:
Hi royjayd,

I couldn't understand your requirements can you give me examples:
When user select for example row "User Id" combo box will display that value as text by default.
Do you want to rearrange in the dataProvider and move to first index?
0
 
royjaydAuthor Commented:
no no. let me explain with a image. I have attached an image. In the image the combo box shows the values: Project, work name, user id, username.

My requirment is
1.  I want all the values to display above the combo box not below. .like usally its called Drop-Down, i want Drop-UP .
2. Like you can see in the image the background color of all the combobox values is white. I want to change the background color to black

thanks

pic1.bmp
0
 
dgofmanCommented:
<mx:Style>
	ComboBox {
		alternatingItemColors: #000000, #000000;
		dropDownStyleName: "myComboBoxDropDowns";
	}

	.myComboBoxDropDowns {
		color: #ff0000;
	}
</mx:Style>
<mx:ComboBox enabled="true" rowCount="2">
	<mx:dataProvider>
		<mx:Array>
			<mx:String>Project</mx:String>       
			<mx:String>Work Name</mx:String>
			<mx:String>User Id</mx:String>
			<mx:String>User Name</mx:String>
		</mx:Array>                   
	</mx:dataProvider>
</mx:ComboBox>

Open in new window

0
 
royjaydAuthor Commented:
thanks. I actually want the background color to be black, not the color of the actual text.
Actual text color can be anything (red, or white). Like you see the
in the above diagam the box that contains 'project', 'work name' , ect. The background color of that box should be black.

any idea?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.