4 Replies Latest reply on Jan 28, 2009 8:52 AM by Ugo Ducharme

    Resize transitions and relative-sized components.

    Ugo Ducharme
      In my coding style, I tend to indicate sizes in a relative way (width="50%"). It is, IMO, the best way for business-oriented application.

      I now work on a module that uses lots of transitions (mostly resizing panels). To do that, I found that, because I use relative sizing, instead asking a panel to grow, I have to ask other panels to get smaller (<mx:Resize heightTo="0" />). When I want those panels to get back to their original sizes, I can't use <mx:Resize heightTo="100%" /> because Resize don't accept relative size. Instead I use AnimateProperty to the percentHeight but that feels not right and the result is a bit erratic.

      So, I asked myself, does my programming style gets in the way of achieving my goals? Should I use pixel-based sizes in this module? I would like to hear your insights on the subject.