3 Replies Latest reply on Jun 14, 2006 6:38 AM by aginternet

    Viewstack object height issue

    aginternet
      Hi all,

      Using 1.5 - I'm having difficulty getting any object I place within a form within a viewstack to give me a height of 100%. Static heights work fine, but the percentages hate me. I've cheked all my nested objects to make sure nothing is cutting me off. What's going on here?

      TIA

      Aaron G
      Philadelphia, PA
        • 1. Re: Viewstack object height issue
          Level 7
          Hi Aaron,

          Could you please provide some sample code which causes the problem, and
          explain what is going wrong with the percentages?

          Thanks,
          - Rob


          "aginternet" <webforumsuser@macromedia.com> wrote in message
          news:e6n8hd$cgs$1@forums.macromedia.com...
          > Hi all,
          >
          > Using 1.5 - I'm having difficulty getting any object I place within a form
          > within a viewstack to give me a height of 100%. Static heights work fine,
          > but
          > the percentages hate me. I've cheked all my nested objects to make sure
          > nothing is cutting me off. What's going on here?
          >
          > TIA
          >
          > Aaron G
          > Philadelphia, PA
          >


          • 2. Re: Viewstack object height issue
            aginternet Level 1
            Robert,

            Here's a simple app that illustrates my problem. Any control that I put within a form that's within a viewstack won't stretch to 100% height. What am I doing wrong here?

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.macromedia.com/2003/mxml">
            <mx:ViewStack id="testStack" height="100%">
            <mx:Form label="testForm" height="100%">
            <mx:DataGrid id="datagrid1" height="100%">
            <mx:columns>
            <mx:Array>
            <mx:DataGridColumn headerText="Column 1" columnName="col1" />
            <mx:DataGridColumn headerText="Column 2" columnName="col2" />
            </mx:Array>
            </mx:columns>
            </mx:DataGrid>
            </mx:Form>
            </mx:ViewStack>

            </mx:Application>

            Thanks for any help you can give.

            Aaron G
            Philadelphia, PA
            • 3. Re: Viewstack object height issue
              aginternet Level 1
              NEVERMIND!

              I found the solution! For anyone else out there making the same mistake as me, here's the fix. You simply need a container that is NOT a form. The datagrid works fine if I put it in a canvas, set the x and y to 0, and the height to 100%.

              Being a relative newbie at this I'm assuming that forms only like form items and it not a catch all default form.

              Aaron G
              Philadelphia, PA