is there any way to get an event when I switch between widget on a Stackpanel?
something like an openhandler for stackpanel. I have to know the index of
an open Widget on a Stackpanel.
is there any way to get an event when I switch between widget on
Share
Using StackLayoutPanel: http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/StackLayoutPanel.html
Use the
addSelectionHandler()method. To get the selected widget, you can usegetVisibleIndex()orgetVisibleWidget().EDIT: This is using StackLayoutPanel, the OP uses StackPanel. The difference between them is that StackPanel is for quirks mode and StackLayout Panel for Standards Mode. I would StackLayoutPanel or any Layout related widget as new GWT widgets uses them, like the new DataGrid.