Thursday, January 23, 2014

A Simple ComboBox/ListBox snippet/example for Widgets.

As I needed a way to easily manage localization selection (iow changing language on the page),
I was looking around for a listbox that supported images (for country flags). Sadly it seemed the only 
available options were embedded in large, complex libraries such as SmartGWT.

Anyhow I decided to start working on a solution and came up with something pretty neat IMO.
The idea is simple, the widget consists of one display panel and one popup panel.
Either one can not contain the same widget.

The selected widget is shown in the display panel, the rest is shown in the popup panel.
When you click the display area, the popup panel is shown, and displays the other items.

Use case code paste:

Class code paste:

I hope the example is useful to someone.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment