2 Replies Latest reply on Jul 13, 2009 9:48 AM by y10k

    how to mix percent sizing and pixel sizing (height)?


      My Flex 4 MXML application that has mainly two components: first is a canvas that takes up as much as space as possible (100% - 30px), the other is some buttons and text input fields in the bottom that takes only 30 pixels.


      Is there an easy way to do this other than adding an event handler to listen to window resizing?

        • 1. Re: how to mix percent sizing and pixel sizing (height)?
          Flex harUI Adobe Employee


               <mx:Canvas height="100%" />

               <mx:HBox height="30" >

                    <mx:Button />

                    <mx:TextInput />




          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: how to mix percent sizing and pixel sizing (height)?
            y10k Level 1

            Thank you. This is very similar to what I have right now - but

            apparently the canvas object goes out of bound. I realize this when I

            drag the buttom bar, the mouseup/down event also triggers my drag

            handler in canvas.







            <s:Group width="100%" height="100%">

                 <flare:FlareVis id="fvis" backgroundColor="0xffffff" width="100%"

            height="100%">  -- this is a canvas object



                 <s:VSlider id="zoomslider"

                      height="160" x="14" y="14" value="50" valueInterval=".25" /> -

            visually this goes on top of the FlareVis object - but I have to place

            it outside the FlareVis. When I placed this as a child object in the

            FlareVis tag, the rendered Sprites in the canvas goes above VSlider

            and I can't drag the slider




            <mx:Form id="highlightForm"

                 width="100%" height="27">

                 <s:HGroup width="100%" height="100%" verticalAlign="middle">


                      <s:SimpleText id="highlightSummary"></s:SimpleText>





            Is there any other way to do this?