try adding image on tab bar and then change the url of image on tab
change.
Like:
Image[] images = new Image[n];
images[0] = new Image();
img1.setURL("active.png");
tabBar.addTab(img1);
images[1] = new Image();
images[1].setURL("inactive.png");
tabBar.addTab(images[1]);
and so on for rest of the tab.
and then on tabChange:
public void onTabSelected(SourcesTabEvents bar, int index) {
images[index].setURL("active.png");
//set url of other images to 'inactive.png'
}
-Bakul
On Oct 23, 9:44 am, ArunDhaJ <[EMAIL PROTECTED]> wrote:
> Hi All,
> On selecting a TabBar how to change the Widget?
>
> Actually I'm having 3 sets of picture to show the TabBar in selected
> mode and another 3 sets of picture for TabBar in unselected mode.
>
> Upon loading I'm creating an HTML widget with tab_left, tab_center and
> tab_right image and repeating tab_center image till the required
> length.
>
> When I select the TabBar I need to create another HTML widget with the
> other three sets of images.
>
> Using style sheet we can specify only one image but in my case I need
> to replace 3 images.
>
> How to change the HTML widget in selected state to unselected state?
>
> In TabListener's onTabSelected event we can only get the HTML using
> tabPanel.getTabBar().getTabHTML(tabIndex));
>
> is there any way to set the HTML??
>
> Thanks in Advance !
> -ArunDhaJ
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---