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: http://paste2.org/JI699EWK

Class code paste: http://paste2.org/kOzdGVNY


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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment