Check the javadoc for TabBar. It tells you what CSS selectors to use.
Specifically, it sounds like you'll want to use these:
.gwt-TabBar .gwt-TabBarItem {
background-color: black;
color: white;
}
.gwt-TabBar .gwt-TabBarItem-selected {
background-color: white;
color: black;
}
You'll probably want to choose different colors. ;)
However, if you're looking for a "down" state (tab has received mouse-
down but not yet received mouse-up) or you need to have unique colors
for each tab (based on more than whether or not it's selected), you'll
have to do something different as that's not built-in functionality.
Furthermore, if you're using a DecoratedTabPanel, you'll want to look
at the javadoc for DecoratedTabBar, and I'm pretty sure you have to
bring your own rounded corner graphics if you want to use tab colors
other than the default.
-Brian
On Nov 27, 6:27 am, Abhishek Kumar <[email protected]> wrote:
> I want to provide different styles to diferent tabs in a tab panel. It
> is required to have different color for "on click" and for "not
> clicked".
>
> I tried to use GWT 1.7 API a lot. At maximum I could change the tab
> bar style but was unable to get anything for individual tabs. Though I
> think from the deprectaed API helps a bit. BUt I dont want to use the
> deprecated one. Instead I want to do with the "addSelectionHandler"
> but was not succesfull. Please help.
--
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.