3 Replies Latest reply on Aug 27, 2008 12:13 AM by Craig Grummitt

    Image constrain width and resize in VBox

    Craig Grummitt Level 3
      I've got a crazy problem that's taking me way too long to resolve!

      I've simplified it for you - see attach code. I have an Image that i want to constrain to 400 width, and then i have left height blank so that it scales to whatever height is necessary. Following the image in a VBox, three buttons should follow on immediately, which load in three different images.

      Image a and b work fine. They are both narrower than 400 pixels. Image c is the problem. It is wider than 400 pixels. Flex seems to interpret it as its original height, rather than its scaled height. and the buttons which should follow the image immediately follow on 1200 odd pixels later...

      There has to be a simple solution to this as google isn't turning anything up and it must be a common scenario. How can i force the VBox to interpret the Image component to be its scaled height when positioning elements?