View Full Version : Menu's needed for Icon's, especially in Header class

3 Feb 2010, 2:39 AM
After searching the web and forums i didn't come up with anything. In common desktop applications you get a menu when you click on the icon in the top left of any app, at least in windows and linux. Unfortuantely GXT doesn't provide and standard Solution for this. In the Window or ContentPanel class we can access the Header and set an icon there via setIcon() but this only allows the AbstractImagePrototype. My quick and dirty attempt on a solution would be sth like this, which doesn't work yet:

Icons icons = GWT.create(Icons.class);
Image image = new Image(icons.document());

WidgetComponent wc = new WidgetComponent(image);
wc.addListener(Events.DoubleClick, new
Listener<ComponentEvent>() {

public void handleEvent(final ComponentEvent be) {
MessageBox.alert("click on the icon, let's open a menu now somehow", "bla", null);
} });


I think this is a commonly needed thing for web desktop applications and I think it should be in the base lib. Did anybody solve this already and would be so kind to share some basic code?