dam1an
20 Jul 2009, 7:20 AM
I have a tab panel with tabs (taken from BasicTabPanel example). I want to listen for mouseover event on each panel so that I can display each panel (rather forcing the user to click the tab panel).
I can trigger this event on the TabPanel itself but not on each individual panel. Is this a bug or am I doing something wrong?
Thanks,
Damian
VerticalPanel vp = new VerticalPanel();
vp.setSpacing(10);
TabPanel panel = new TabPanel();
panel.setPlain(true);
panel.setSize(450, 250);
final TabItem normal = new TabItem("Search");
normal.addStyleName("pad-text");
normal.addText("Autocomplete textfield to go in here...");
normal.addListener(Events.OnMouseOver, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
Window.alert("SearchTab Was Selected");
}
});
panel.add(normal);
...
vp.add(panel);
add(vp);
I can trigger this event on the TabPanel itself but not on each individual panel. Is this a bug or am I doing something wrong?
Thanks,
Damian
VerticalPanel vp = new VerticalPanel();
vp.setSpacing(10);
TabPanel panel = new TabPanel();
panel.setPlain(true);
panel.setSize(450, 250);
final TabItem normal = new TabItem("Search");
normal.addStyleName("pad-text");
normal.addText("Autocomplete textfield to go in here...");
normal.addListener(Events.OnMouseOver, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
Window.alert("SearchTab Was Selected");
}
});
panel.add(normal);
...
vp.add(panel);
add(vp);