0 Replies Latest reply on Jan 4, 2012 11:25 AM by KavinKannan

    Why remove existing border and add new border in a Container Class


         I am trying to understand the way how Flex adds a border to a container.


      In the container class, I noticed the line


      rawChildren.removeChild(DisplayObject(border)); under override public function styleChanged(styleProp:String):void method.


      if (border)



                      border = null;




      I understand this menthod is trying to do ' remove a border if there is one and then create a new one' -

      Why is it necessary to remove an existing 'border' , to update style changes ?