Flex: How to set the hand cursor?

 7 months ago
source link: https://www.codesd.com/item/flex-how-to-set-the-hand-cursor.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Flex: How to set the hand cursor?


I'm trying to set the hand cursor on an HBox. I've tried buttonMode and useHandCursor but have had no luck. This example displays the busy cursor. Can anyone tell me how to make it display the flashPlayer's hand cursor?

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="com.dn2k.components.*"  >

        private var cursorID:int;

        protected function box_mouseOverHandler(event:MouseEvent):void

<mx:HBox id="box" useHandCursor="true" buttonMode="true" mouseChildren="false" backgroundColor="0xcc0000" mouseOver="box_mouseOverHandler(event)">
    <s:Label text="Hiya sexy..."/>

This code shows it perfectly while mouse is over container:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
    <mx:HBox backgroundColor="0xcc0000" buttonMode="true" id="box" mouseChildren="false" useHandCursor="true">
        <s:Label text="Hiya sexy..." />

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK