4 Replies Latest reply on Dec 1, 2008 1:48 PM by rtalton

    Customized buttons not showing hand cursor

    Handycam Level 1
      I have button and buttonbar components in my app. I have applied new skins to them using CSS. However, they do not show the hand cursor, so that it obvious to the user that they are, in fact, buttons.

      For example:
      <mx:Button click="goLink()" id="goBtn" width="18" height="19" styleName="customButton" mouseEnabled="true" />


      .customButton {
      color: #FFFFFF;
      text-roll-over-color: #FFFFBB;
      text-selected-color: #9999FF;
      disabled-color: #333333;
      up-skin: Embed(source="assets/btn_arrow.png");
      over-skin: Embed(source="assets/btn_arrow.png");
      down-skin: Embed(source="assets/btn_arrow.png");
      disabled-skin: Embed(source="assets/btn_arrow.png");
      }

      What happened?
        • 1. Re: Customized buttons not showing hand cursor
          rtalton Level 4
          Buttons, by default, do not display a hand cursor. So web 1.0!
          We have to tell the button to do this. Set the buttonMode property to TRUE.

          Read the help docs on the button properties, and take note of buttonMode, useHandCursor and mouseEnabled. These additional properties can help you when you want another type of object to behave like a button with a hand cursor. Sounds like you may be soon headed down this road so I thought I'd mention it.
          • 2. Re: Customized buttons not showing hand cursor
            Level 7

            "rtalton" <webforumsuser@macromedia.com> wrote in message
            news:gh103g$gd1$1@forums.macromedia.com...
            > Buttons, by default, do not display a hand cursor. So web 1.0!
            > We have to tell the button to do this. Set the buttonMode property to
            > TRUE.
            >
            > Read the help docs on the button properties, and take note of buttonMode,
            > useHandCursor and mouseEnabled. These additional properties can help you
            > when
            > you want another type of object to behave like a button with a hand
            > cursor.
            > Sounds like you may be soon headed down this road so I thought I'd mention
            > it.

            I think for many components you also need to set mouseChildren="false" and
            useHandCursor="true"


            • 3. Re: Customized buttons not showing hand cursor
              Handycam Level 1
              Yes, useHandCursor="true" was needed.

              You would think that if something is a button, it should by default show the cursor for one, wouldn't you...
              • 4. Re: Customized buttons not showing hand cursor
                rtalton Level 4
                Hear ya. But Flex can use lots of tricks to get user focus on an object; the hand cursor is just one. And all the components can use the hand cursor, so we get that flexibility when we need it.