Flex, can't custom style the tooltip
I'm having trouble changing the font size of my TextInput tooltip. The text input looks like this:
<s:TextInput id="first"
toolTip="Hello"/>
then I create a style like this:
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/halo";
mx|ToolTip {
fontSize: 24;
}
</fx:Style>
but absolutely nothing happens. Any idea what I may 开发者_如何学运维be doing wrong?
P.S. I also get a yellow warning: "CSS type selectors are not supported in components: 'mx.controls.ToolTip'" but it still compiles since it's just a warning, but nothing happens.
In Flex 3.x the CSS selector
ToolTip {
font-size: 24;
}
works fine. Try yours without the namespace prefix just to see if it works at all. If it does, there may be something wrong with your namespace URI.
I was working on a separate mxml component. It turned out that for whatever reason the style wouldn't take when placed in the component itself. They worked when placed in the main application. Not sure why, but moving them fixed it. If anyone has a clarification, would be nice to know.
The following worked for me:
mx|ToolTip {
fontSize: 13px;
}
s|ToolTip {
fontSize: 13px;
}
精彩评论