Blog >> Post

Ensuring the hand cursor is displayed in Flex components

Flex

I’m not sure if it’s a bug in the Flex code framework, but I have found it difficult to get the hand cursor working when hovering over components like Labels/Text which aren’t used as links by default. After bashing my head against my desk for a few hours and doing some research on the web, I finally came across a solution which which works in most cases. To get the hand cursor working you need use the following 3 properties:

buttonMode=”true” mouseChildren=”false” useHandCursor=”true”

Here’s an example of a Label which is used as a link:

< mx:Label text="Log out" buttonMode="true" mouseChildren="false" useHandCursor="true" click="logout()" />

It seems like it’s a pretty common problem and these two articles showed me the light of day, thanks for the help guys!

Leave a Reply