0 Replies Latest reply on Oct 16, 2010 3:15 AM by anuj_gakhar

    SkinnableContainer Question (Conceptual)

    anuj_gakhar Level 1

      I am writing a Custom Container that extends SkinnableContainer with a Custom Skin aplied to it. The job of this Container is to draw some borders/backgrounds and then draw a arrow tail (like in a tooltip)....

       

      Within the skin I am using a Path element to draw lines for this arrow and these lines are updated in the override updateDisplaylist() within the Skin. So within the Skin's override updateDisplayList(), I do something like

       

      tail.data = createpathData();

       

      Now this works Ok, as long as I specify an explicit width/height to the Container. But if I don't give it a explicit width or give it a width of 100% - then it goes in an infinite loop because everytime Path's data gets created, the height or width of the Skin changes and updateDisplayList gets triggered again.

       

      On a second thought, I then decided to keep this Path Element outside the Skin and keep it in the HostComponent (by adding it in createChildren()) and control it's data from the hostComponent itself. But in this case, now I need to know when the Skin's updateDisplayList is done doing it's work.

       

      Can anyone point me in the correct approach for doing this thing? I hope I have been clear enough in asking this question...