placing a widget in a dropdown

16 views
Skip to first unread message

Jaimon

unread,
Dec 4, 2009, 12:15:49 AM12/4/09
to Google Web Toolkit
hi,
i would like to create something that looks like a dropdown/listbox
that contains no just text but also images,
and each image perfoms a different action, so basically i would like
to create something that opens up like a drop down but each item is a
widget.

the dropdown list is now sutible for that since the addItem is only
for text.
at some point i thought on doing it with menu items but it is also not
really right...


any one has any idea?
Jaim

djd

unread,
Dec 4, 2009, 5:29:05 AM12/4/09
to Google Web Toolkit
I also needed this, the idea is simple. You have 2 options:

1. From the plethora of gwt extension libraries (gwt-mosaic, gwtx,
smartgwt, ext js, MyGWT), I'm pretty sure you can find a listbox that
will fit your needs

2. Create a custom listbox from scratch, adjusting it to your needs.
If you plan to do this, the simplest way is to extend a Composite, and
having the dropdown list as a PopupPanel or AbsolutePanel (with big z-
index so it stays on top).

Best of luck,
Alex D

Joe

unread,
Dec 4, 2009, 6:46:14 AM12/4/09
to Google Web Toolkit
Hi Jaimon,

There's a widget i have created long time ago, it's a listbox
functionality,
but where i have control on all css and styles and design of it. As
you know,
the normal listbox of gwt depends on your browser look and feel.
But the idea is simple:

You need to have a textbox with image(drop down arrow).
Then, when you click on the image, a popup will appear below it.
The popup can contain a scrollpanel with a vertical panel.
The vertical panel can conatin any widget you want, a label, an image,
a textbox, etc ...

Hope this will be helpful, let me know if you need any help.

Good luck,

Joe
Reply all
Reply to author
Forward
0 new messages