Display Hand Cursor on Label and Buttons and Text objects in Flex

Hi All,

Sometime we got a requirement where we have to show hand cursor on flex components, mostly like where we have some clickable text,  For that there are 2 properties which we can use to achieve this requirement.

1. Button Mode=”true”
2. useHandCursor=”true”

****************
As a hack sometime we need to add one more property
3. mouseChildren=”false”
************************

All the properties accepts “true” or “false” value.

e.g
<mx:Button id=”w” click=””  buttonMode=”true” /> [Note: On buttons use only buttonMode=”true”]
<mx:Label  text=”testing again” buttonMode=”true” useHandCursor=”true” mouseChildren=”false” />

If you are creating a flex objects on the fly like button and clickable text, you can simply set these properties e.g

btnObj.buttonMode=true;
textObj.useHandCusror=true;

Hope this helps.


Thanks
R Vashi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s