TabPane Background Colors and TabPane tooltipText

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TabPane Background Colors and TabPane tooltipText

Scott Baxter
Can anyone point me in the right direction to change a TabPane's background color?  It seems to default to gray, and I don't seem to be able to override it by doing a styles="{backgroundColor:'#FFFFFF'}".  I don't get anything telling me that's not a valid style as I might expect, but it appears to have no effect.

Also, I'm trying to create a TabPane that only has icons on the tabs.  That seems to work just fine.  However, I'd like to have tooltipText for each tab.  If I add tooltipText to each TablePane in the tab, then I get the tooltipText when I mouse over the TablePane, but not the tab itself (defeating the purpose of a tool tip since by the time they've clicked on the tab, they know what it is).  TabPane doesn't seem to have a setTooltipText function.  Has anyone attempted this with Pivot before?
Reply | Threaded
Open this post in threaded view
|

Re: TabPane Background Colors and TabPane tooltipText

Greg Brown
Administrator
Hi Scott,

> Can anyone point me in the right direction to change a TabPane's background color?  It seems to default to gray, and I don't seem to be able to override it by doing a styles="{backgroundColor:'#FFFFFF'}".  I don't get anything telling me that's not a valid style as I might expect, but it appears to have no effect.

The "backgroundColor" style applies to the entire tab pane, including the area under the buttons. The "activeTabColor" style may be what you are looking for.

> Also, I'm trying to create a TabPane that only has icons on the tabs.  That seems to work just fine.  However, I'd like to have tooltipText for each tab.  If I add tooltipText to each TablePane in the tab, then I get the tooltipText when I mouse over the TablePane, but not the tab itself (defeating the purpose of a tool tip since by the time they've clicked on the tab, they know what it is).  TabPane doesn't seem to have a setTooltipText function.  Has anyone attempted this with Pivot before?

Interesting use case - not currently supported. Feel free to submit this as a feature request.

Greg

Reply | Threaded
Open this post in threaded view
|

Re: TabPane Background Colors and TabPane tooltipText

Scott Baxter
Greg,

Thank you, activeTabColor is exactly what I wanted.  Where in the source can I find the available styles for each component so I don't have to ask this type of question again?

As for the tooltipText for the tab, I will submit a feature request.

Scott

On Tue, Feb 23, 2010 at 2:11 PM, Greg Brown <[hidden email]> wrote:
Hi Scott,

> Can anyone point me in the right direction to change a TabPane's background color?  It seems to default to gray, and I don't seem to be able to override it by doing a styles="{backgroundColor:'#FFFFFF'}".  I don't get anything telling me that's not a valid style as I might expect, but it appears to have no effect.

The "backgroundColor" style applies to the entire tab pane, including the area under the buttons. The "activeTabColor" style may be what you are looking for.

> Also, I'm trying to create a TabPane that only has icons on the tabs.  That seems to work just fine.  However, I'd like to have tooltipText for each tab.  If I add tooltipText to each TablePane in the tab, then I get the tooltipText when I mouse over the TablePane, but not the tab itself (defeating the purpose of a tool tip since by the time they've clicked on the tab, they know what it is).  TabPane doesn't seem to have a setTooltipText function.  Has anyone attempted this with Pivot before?

Interesting use case - not currently supported. Feel free to submit this as a feature request.

Greg


Reply | Threaded
Open this post in threaded view
|

Re: TabPane Background Colors and TabPane tooltipText

Greg Brown
Administrator
> Thank you, activeTabColor is exactly what I wanted.  Where in the source can I find the available styles for each component so I don't have to ask this type of question again?

You can look at the Javadoc for the various skin classes. The JavaBean properties of the skins are equivalent to the styles exposed by the component. Most skins live in the org.apache.pivot.wtk.skin.terra package, though some live in org.apache.pivot.wtk.skin.