In Flex, by default, when you mouse over a Text Input the mouse cursor is changed to the standard I cross bar. How can I change this cursor so the regular mouse pointer cursor is shown rather than the I cross bar?
update: Well, it seems this process is dirt simple in Flex 4 according to this blog post: http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/
Since I'm stuck with Flex 3 for the time being, how can I do something similar?
update2: Also, this question is somewhat similar to this question: Avoiding cursor change over dynamic text fields in Flash CS3
Though, I am using the standard Flex Builder, not Flash CS3.
Change a single mouse cursor (Windows) In Windows 8, typing anywhere on the Start Screen brings up the search box automatically. In the Mouse Properties window that appears, click the Pointers tab. On the Pointers tab (shown below), select the mouse cursor you want to change in the Customize section.
The default cursor for a hyperlink is "pointer". To change it, you need to specify the cursor type for your <a> element with the CSS :hover selector. In our example, we style only the "link" class.
That said, you can open the Mouse Properties panel first and go to the Pointers tab. Then, select the Normal Select option, click the Browse button, and choose a crosshair cursor. Finally, click the OK button to save the change. That's all!
Just to clarify - the MouseCursor and Mouse classes exist also in Flex 3 on flash 10. So you can hook to the MOUSE_OVER and MOUSE_OUT events:
elem.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
Mouse.cursor = MouseCursor.BUTTON;
});
elem.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
Mouse.cursor = MouseCursor.ARROW;
});
There are three properties that must be modified useHandCursor = true buttonMode = true mouseChildren = false
Leete more information this article http://www.anujgakhar.com/2008/03/27/flex-how-to-display-hand-cursor-on-components/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With