This content has been marked as final. Show 4 replies
Try keeping everything as it is, but remove the mouseChildren="false", and that will prevent mouse events getting to the child controls.
When I remove mouseChildren="false" the cursor no longer changes to a hand (in Flex 2). It doesn't look like this method is compatible with the ComboBox control.
You're right - I tried it. The hand cursor appears when the mouse is over the border or over the button, but not over the child textInput control or the List control. If you extend the component you could probably set the buttonMode and useHandCursor on each of the children (and perhaps their children). You would have to register your own itemRenderer to be used by the List to present your items as well (assuming you want the hand for that too).
I don't think it will be easy. Another option is to just set the cursor to the hand cursor on the mouseOver event and unset it on the mouseOut - see the doc on CursorManager. I don't know if you get access to than hand cursor class that flex uses.
I currently have a solution, but it's not as perfect as I'd like it to be. Following a great suggestion from a poster on actionscript.org, I extended the CursorManager class with two new methods: setHandCursor() and removeHandCursor(), using setBusyCursor() and removeBusyCursor() as a template. Now I just use these two methods on rollover events to access the hand cursor (as you also suggested above).
The reason it's not a perfect solution is because I had to create a custom bitmap hand cursor instead of leveraging the system hand cursor. Two negative side effects of this:
1. Sometimes the custom hand cursor movement is jerky (e.g., hovering over a pie chart series).
2. By default Windows renders an alpha-shaded shadow below the cursor; however, if you use a bitmap cursor then you lose that effect, so it's inconsistent.
I'm going to look through the SDK classes to see if there's a way I can extend the CursorManager class to use the system hand cursor instead of creating a custom bitmap cursor.