Home > ActionScript, Adobe, Air, Flex > Add Hand Cursor to Flex Tab Navigator

Add Hand Cursor to Flex Tab Navigator

In Flex Tab Navigator, you can’t have Hand Cursor when you mouse over the tab’s, I had to do little hack to achieve this.

Created two functions and linked them with mouse over and mouse out events.

Say your Tab Navigator’s id is “myTabNav”:

Here are the functions which would do the trick:

private function setHandCursor(event:MouseEvent):void
{
var classInfo:XML = describeType(event.target);
var cn:String = classInfo.@name.toString();
if(cn == “mx.controls.tabBarClasses::Tab”)
{
//this will bring the hand cursor

this.myTabNav.buttonMode = true;
this.myTabNav.useHandCursor = true;
}
}
private function removeHandCursor(event:MouseEvent):void
{
var classInfo:XML = describeType(event.target);
var cn:String = classInfo.@name.toString();
if(cn == “mx.controls.tabBarClasses::Tab”)
{
// this will remove the hand cusror

this.myTabNav.buttonMode = false;
this.myTabNav.useHandCursor = false;
}
}

 

you need to do as above otherwise the hand cursor will either show on complete Tab Navigator

Advertisements
Categories: ActionScript, Adobe, Air, Flex
  1. May 29, 2013 at 5:46 pm

    First of all I want to say great blog! I had a quick question that I’d like to ask if you don’t mind.
    I was interested to know how you center yourself and clear
    your thoughts before writing. I’ve had trouble clearing my mind in getting my thoughts out. I truly do enjoy writing but it just seems like the first 10 to 15 minutes are lost just trying to figure out how to begin. Any ideas or hints? Many thanks!

    • May 29, 2013 at 6:02 pm

      Sorry buddy, I am just a technical person who writes on the issues he has come across. I am not a writer.

  2. May 23, 2013 at 4:25 am

    I think this is one of the most vital information for me. And
    i’m glad reading your article. But should remark on some general things, The site style is ideal, the articles is really nice : D. Good job, cheers

  3. May 24, 2012 at 11:40 am

    Thanks @Sharath

  4. Sharath
    February 15, 2012 at 5:43 pm

    This is really good and very helpful

  1. No trackbacks yet.

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

%d bloggers like this: