2 Replies Latest reply on May 31, 2010 10:52 PM by Ashok Deivasigamani

    Need to restrict the click event to the titleBar of Panel

    Ashok Deivasigamani Level 1

      Hi Guys,

      I have a requirment that the Panel in my Application should explode to the entire window when I click on the Panel.

      I had written the code for exploding the panel, but the panel explodes where-ever I click on the Panel, but my requirment is to explode the Panel when the user hits only on the titleBar of the Panel. For your referance I had included the relevent code that I had completed as part of my requirment.

      Kindly help me in resolving the issue




                private function resize(e:Event) : void {

                     myPanel.percentHeight =100;

                     myPanel.percentWidth = 100;






      <mx:Panel id="myPanel" click="resize(event)" height="50%" width="50%">





      The above code is a sample to explain my requirment, in my actual code i have used the includeLayout of the other containers of the Application to be False.

      I find that the titleBar is a protected inherited property, Is there any way to use hitTestObject() or hitTestPoint() to solve the issue.