Hi Isaac,

Thanks for the tip.

I'm guessing that I just download the JAR for this type of ListBox,
then deploy it to my WEB-INF/lib folder when deploying?

On Oct 2, 7:51 am, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> Kevin,
>
> There's a DropDownListBox widget in the Incubator that might be more
> in line with what you're trying to achieve here. It uses a PushButton
> and a PopupPanel to simulate the behavior of a standard <select>
> element. The use of widgets gives you a lot more control over
> appearance and function.
>
> - Isaac
>
>
>
> On Wed, Oct 1, 2008 at 3:58 PM, Kevin <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I hope your day's going well.
>
> > In my GWT client code, I have a ListBox that has text representing
> > cars. If you pick "Sedan," it should bring up a picture of a sedan. If
> > you select "SUV," it should bring up a picture of an SUV.
>
> > I know that you can't add images as inputs to a GWT ListBox, however I
> > know that you can add background-images in a CSS.
> > <--------------------------------------------------------------------------­-----
>
> > Consider my "client code":
>
> > ListBox lb = new ListBox(); // you need to instantiate a ListBox so
> > you can use it
>
> > lb.addItem("Sedan"); // you need to populate
> > lb.addItem("SUV");   // the ListBox options
>
> > if ( item.selected == 0 )
> >    lb.setStyleName("sedan");
> > else
> >    lb.setStyleName("SUV");
> > <--------------------------------------------------------------------------­-----
>
> > <--------------------------------------------------------------------------­-----
>
> > Now look at my "HTML code"
>
> > <style type = "text/css">
>
> > .Sedan { background-image: URL(.../images/Sedan.jpg) }
> > .SUV{ background-image: URL(.../images/SUV.jpg) }
>
> > </style>
> > <--------------------------------------------------------------------------­-----
>
> > After, when I select a ListBox option, only text appears - no image.
>
> > My ultimate goal is to have a ListBox with images that when you select
> > one, its picture becomes the selected, i.e. only visible, image.
>
> > Thanks,
> > Kevin- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to