jcovert
jcovert

Reputation: 550

GWT Multiselect Dropdown Listbox

I'm looking to create a multi-select dropdown listbox in GWT, but I'm not sure how to go about doing so. I'd like it to be similar to this:

Multi-select Dropdown Listbox

Any suggestions?

Should I take gwt ListBox code and adapt it to accept objects? Or should I forget their Listbox and try to make my own from scratch? Or should I go in a different direction completely? I'd really prefer not to include external libraries (like SmartGWT) if possible - I'm trying to stick with straight-up GWT.

Please advise.

Thanks!

Upvotes: 1

Views: 3650

Answers (2)

jcovert
jcovert

Reputation: 550

For anyone interested, I actually ended up rolling my own...

It's a TextBox with an Image next to it. And each of these has a ClickHandler that shows/hides a DecoratedPopupPanel positioned at (TextBox.left, TextBox.top + TextBox.height).

Seems to work alright for me - and I can put anything I want in it. Getting the Image to line up nicely with the Textbox is a little tricky in IE, but in FF it looks great. :)

Thanks!

Upvotes: 2

ianmayo
ianmayo

Reputation: 2402

I'm planning a UI that also has a multi-select requirement.

I currently intend using a popup dialog following the List-Builder UI pattern, which can be easier to navigate than a multi-select drop-down list - particularly with long lists. It's simplicity means you'll only need to use a plain list, not a drop-down/combo.

Upvotes: 0

Related Questions