2010-02-19

Change mouse cursor on a Label control

Since I was using a Label control to display some HTML text (monetary amount with its appropriate currency symbol), I also wanted to use it to display a detail pop-up window. Easy enough just need to code a handler for the click event.

However there is no visual cue that tells you that the Label is click-able, like the mouse cursor changing to a hand. But there is a way, you can make it do this automatically when someone hovers over the Label control. Its not obvious, so here are the 3 properties you have to set:

<mx:Label buttonMode="true" useHandCursor="true" mouseChildren="false"/>

No comments: