I have a panel component on my flex application. This component has a click event which is fired when the used makes click on the panel. But I would like to know the zone of the panel where click was made. In fact what I want to know is if click was made on the title bar of the panel.
How can I do that?
I have a panel component on my flex application. This component has a click
Share
The MouseEvent stores the location of the mouse when the click was made in the
localXandlocalYproperties. That way you can calculate a bit to find out, if the mouse was above the title bar or not.Most standard components also offer access to some of their child elements. The Panel component for example has a property Panel.titleBar that can be accessed when deriving a new component class. So you could for example create a new class that offers a special event for clicks on the title bar, by making it possible to add an event listener for the title bar from the outside.