In ListBox, how to you format first item Select... to italic and gray?

Skip to first unread message


Jun 30, 2011, 10:29:18 AM6/30/11
In ListBox, how to you format Select... to italic and gray?

GWT 2.3, still learning...
It is standard to have select visibile in the drop down box in italic and grayed out a bit.  I presume Select is simply the first item added.
with other "real " items after that added.

but I don't see how to format the word select.  You cannot attach at CSS to an added item (that I can see).

Any ideas?
Make it a great day!

Eric Metcalf

Jun 30, 2011, 5:24:07 PM6/30/11
You will probably want to have 2 items here.  The "Select.." would be a clickable label with a background image of a downward arrow. The second would be your list adjacent under the first and hidden by default.  When a user clicks on the "Select..." label, you display the list.  When the user clicks a list item, hide the list and have the "Select..." change to the selected item.  This also means your submit button would have to verify that the user selected an item.

Reply all
Reply to author
0 new messages