Magallo
Magallo

Reputation: 196

GWT combobox with custom items

I am trying to define a combobox that shows as items, custom controls instead of standard text only items. The control used is com.google.gwt.user.client.ui.ListBox (standard GWT control) as combobox.

Looking at the Showcase http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellList for example, there is a custom list with custom items. To do this, the example uses the CellList class. Is it possible to use the same technique for a combobox?

More in general, is it possible to use a combobox with custom, complex items (e.g. multi column items, custom complex items of any sort, in general a widget of my own or similar)?

I ask this using standard gwt ui controls, no Ext-GWT, no Smart GWT or others.

Thanks.

Upvotes: 0

Views: 7478

Answers (1)

appbootup
appbootup

Reputation: 9537

You cannot style GWT ListBox as it translates to HTML <select> element. If you still insist on feature rich combo-box like GXT then you can go with

  1. GwtChosen - http://dev.arcbees.com/gwtchosen/
  2. CellList with reduced height, selection mode - single and CustomCell.
  3. GWT SuggestBox - http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSuggestBox

Upvotes: 1

Related Questions