Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Cursor change issue

$
0
0
I have the hand cursor set as standard on my application. When the user opens up my widget, I want the cursor to change to the arrow. I have two functions for the open and close events of the WidgetTemplate. In the open function I do the following:
Code:

                        private function wTemplate_openHandler(event:Event):void
                        {
                                map.addEventListener(MapMouseEvent.MAP_CLICK, mapClickHandler);
                                map.openHandCursorVisible = false;
                        }

In the close function for the widget I do this:

Code:

                        private function wTemplate_closedHandler(event:Event):void
                        {
                                map.defaultGraphicsLayer.clear()
                                map.removeEventListener(MapMouseEvent.MAP_CLICK, mapClickHandler);
                                initDG.removeAll();
                                map.openHandCursorVisible = true;
                        }

I want the arrow cursor to appear as soon as the widget opens, no matter where the mouse is positioned on the application. However, it only changes to the arrow once the mouse is moved over the widget. Once changed, it remains an arrow until the widget is closed and then changes back to a hand as expected. However, when the widget is opened again, the same thing happens.
I assume I am putting the request to make openHandCursorVisible = false in the wrong place but I've tried a few options and can't seem to get it to work.
Any suggestions welcome.
Thanks.

Viewing all articles
Browse latest Browse all 2097

Trending Articles