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

46 vues
Accéder directement au premier message non lu

Bob

non lue,
30 juin 2011, 10:29:1830/06/2011
à google-we...@googlegroups.com
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.
   myrListBox.addItem("Select...");
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?
Thanks!
Make it a great day!
bob

Eric Metcalf

non lue,
30 juin 2011, 17:24:0730/06/2011
à google-we...@googlegroups.com
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.

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message