Ah. I had mouseChildren=true. Must have misread the page I got it 
from.

Is there any way to do this in css, so I can have a style that makes 
anything into a link? The following sets the color, but doesn't force 
the hand cursor:

<mx:Style>
.link
{
    color: blue;
    useHandCursor: true;
    buttonMode: true;
    mouseChildren: false;
}
</mx:Style>
<mx:Text text="hello" styleName="link"/>

Or do I have to subclass mx:Text?


--- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> http://flex.joshmcdonald.info/2008/07/how-to-force-hand-cursor-in-
custom.html
> 
> -Josh
> 
> On Wed, Jul 16, 2008 at 9:12 AM, whatabrain <[EMAIL PROTECTED]> wrote:
> 
> >  The only way I'm able to show the hand cursor over an mx:Text 
element is
> > if I both define the cursor in the style, and include an anchor 
tag in an
> > embedded mx:htmlText. If I omit either of those things, it 
doesn't work. How
> > can I make the hand cursor appear over an ordinary mx:Text?
> >
> > *Here's the style*:
> > .link
> > {
> >  color: blue;
> >  selectable: true;
> >  useHandCursor: true;
> >  buttonMode: true;
> >  mouseChildren: true;
> > }
> >
> >
> > *This shows the hand cursor*:
> >    <mx:Text styleName="link" condenseWhite="true">
> >     <mx:htmlText>
> >      <![CDATA[ <a href="event:http://a.com";>linked text</a> ]]>
> >     </mx:htmlText>
> >    </mx:Text>
> >
> >
> > *This does not show the hand cursor*:
> > <mx:Text styleName="link" condenseWhite="true" text="linked 
text"/>
> >
> >
> > *This does not show the hand cursor*:
> >    <mx:Text styleName="link" condenseWhite="true">
> >     <mx:htmlText>
> >      <![CDATA[ linked text ]]>
> >     </mx:htmlText>
> >    </mx:Text>
> > 
> >
> 
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for 
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>


Reply via email to