Reputation: 12730
I have some text in a Flex 3 application defined as follows
<mx:Text id="textbutton"
text="Link Text"
click="doSomething()"
styleName="linkText"
buttonMode="true"
useHandCursor="true"
mouseChildren="false"/>
And an external CSS
declaration as follows:
.linkText {
/* text-decoration:underline;*/
color: #0000FF;
}
.linkText:hover {
text-decoration:underline;
}
It does not seem to work however as the text does not underline when I mouse over it.
Is there a way to do this purely through CSS
or do I need to programmatically capture the mouse events and set the styles accordingly (seems like overkill)?
Upvotes: 0
Views: 1689
Reputation: 14221
No, you can't do this purely through CSS. You need to catch roll over and roll out mouse events and switch styles on it from some linkText
to linkTextUnderlined
using setStyle()
method.
Upvotes: 2