You can use either of the BeforeSelectionHandler or SelectionHandler for the TabLayoutPanel. If you want to perform your operation after the tab is clicked use the latter

example:

@UiHanlder("myTabPanel")
public void onMyTabClick(SelectionEvent<Integer> event) {

int item =   event.getSelectedItem();

//note item holds the tab id. now compare this against the tab's you have, index starts from zero.

switch(item) {
case tab1 :
break;
case tab2:
break;
}

}


Thanks
Ashwin

On Monday 31 October 2011 12:03:13 PM IST, wahaha wrote:
there is a TabLayoutPanel instance,i want to alert something while i
clicked on the tab button.

how to implement this?



--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to