1 Reply Latest reply on May 28, 2007 4:28 PM by peterent

    Resizable Drawing?


      is it possible to draw a line in Flex such that it is resized proportionally in case the window is resized (without redrawing it explicitly)?

      Thanks a lot!

        • 1. Re: Resizable Drawing?
          peterent Level 2
          You could create a component (extending UIComponent) called "Line" and override the updateDisplayList function, drawing the actual line there. Then place this component where you want the line drawn and add a resize handler to the outer component. When the outer component is resized, calculate a new scaleX and scaleY to the Line component; this way you won't have to redraw the line.

          I think its easier to just redraw the line in by overriding the updateDisplayList function in the component where you want the line.

          May be someone else will think of a better solution.