2 Replies Latest reply on Oct 23, 2008 3:33 PM by Newsgroup_User

    setting both selectable and usehandcursor to true on a label

    vankads
      Hi all,

      I am having label with following properties.

      useHandCursor = true;
      buttonMode = true;
      mouseChildren = false;

      Now I want to select the text of this label also, by setting selectable=true.
      I am not able to figure it out how it can be done. Is there any way to do it.

      Thanks,
      Sudha
        • 1. Re: setting both selectable and usehandcursor to true on a label
          -Hob Level 1
          You might be able to do it, but it'll be a hacky work-around. You'll need to add a mouse-down listener to the UITextField inside the Label. Add the listener with a high priority, so you're sure to get it first.

          When your event listener fires, set mouseChildren=true on the Label. This might allow you to select text. On mouse-up make sure to set mouseChildren back to false.
          • 2. Re: setting both selectable and usehandcursor to true on a label
            Level 7

            "-Hob" <webforumsuser@macromedia.com> wrote in message
            news:gdqi4e$o3k$1@forums.macromedia.com...
            > You might be able to do it, but it'll be a hacky work-around. You'll need
            > to
            > add a mouse-down listener to the UITextField inside the Label. Add the
            > listener with a high priority, so you're sure to get it first.
            >
            > When your event listener fires, set mouseChildren=true on the Label. This
            > might allow you to select text. On mouse-up make sure to set
            > mouseChildren
            > back to false.

            Or simply set useHandCursor and buttonMode to true on all of the children of
            the label in a loop...