Hey all,
I've a set a general style for all Tooltips and want to use a different Tooltip style for a particular image component:
ToolTip
{
border-skin: ClassReference(''skins.customToolTip1'');
color: #ffffff;
font-weight: normal;
}
ToolTip.myImage
{
border-skin: ClassReference(''skins.customToolTip2'');
color: #ffffff;
font-weight: normal;
}
Is there a way to do this?
cheers
Different Tooltip style for different...Hi,
Id selector will be only in Flex 4. See http://opensource.adobe.com/wiki/display/flexsdk/CSS+Advanced+Selectors
If you use Flex3, you only can manually set this style to your toolTip in handler of toolTipCreate event.
Different Tooltip style for different...Thanks Natasha.
I did look at that event but couldn't figure out how to return a tooltip instance with the style set - but just figured it out:
private function toolTipCreateHandler(e:ToolTipEvent):void{
var t:ToolTip = new ToolTip();
t.styleName = ''tooltip'' + model.myCurrentProperty;
e.toolTip = t;?// this is the bit I was missing!
}
%26lt;style%26gt;
ToolTip
{
border-skin: ClassReference(''skins.defaultToolTip'');
color: #ffffff;
font-weight: normal;
}
.tooltip1
{
border-skin: ClassReference(''skins.customToolTip1'');
}
.tooltip2
{
border-skin: ClassReference(''skins.customToolTip2'');
}
%26lt;/style%26gt;
Looking forward to Flex 4's final release!
cheers
No comments:
Post a Comment