4 Replies Latest reply on Jun 3, 2009 1:09 AM by xandesign

    controls inside viewstack not showing full height...

    xandesign

      Hi all,

       

      I have a viewstack control in my flex application which has 3 panel controls and inside each panel conrtrol is a datagrid. The datagrid is populated with XML from a datasource.

       

      The problem I have is that the datagrid and panel conrtols are all squashed up and not streaching to show the content of datagrid or panel.

       

      Any idea how to expand the viewstack, panel and datagrid controls to take up the remaining height of the flex app?

       

       

      Thanks in advance,

       

      Xander

        • 1. Re: controls inside viewstack not showing full height...
          Flex harUI Adobe Employee

          Post some code so we can see what you're doing

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

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

          • 2. Re: controls inside viewstack not showing full height...
            xandesign Level 1

            Here is my code...

             

             

            <mx:ViewStack id="menuOptions" width="100%" paddingBottom="5">

                  <mx:Panel width="100%" layout="absolute" id="panel1" label="Panel 1" title="Panel 1" titleIcon="@Embed(source='resources/panel_icon.png')">

                        <mx:DataGrid id="grid1" width="100%" />

                  </mx:Panel>

             

                  <mx:Panel width="100%" layout="absolute" id="panel2" label="Panel 2" title="Panel 2" titleIcon="@Embed(source='resources/panel_icon.png')">

                        <mx:DataGrid id="grid2" width="100%" />

                  </mx:Panel>

             

                  <mx:Panel width="100%" layout="absolute" id="panel3" label="Panel 3" title="Panel 3" titleIcon="@Embed(source='resources/panel_icon.png')">

                        <mx:DataGrid id="grid3" width="100%" />

                  </mx:Panel>

            </mx:ViewStack>

             

            • 3. Re: controls inside viewstack not showing full height...
              *Prashant Shelke* Level 4

              Please see following changes:


               

              <mx:ViewStack id="menuOptions" width="100%" paddingBottom="5" height="100%">

                    <mx:Panel width="100%" height="100%" layout="absolute" id="panel1" label="Panel 1" title="Panel 1" titleIcon="@Embed(source='resources/panel_icon.png')">

                          <mx:DataGrid id="grid1" width="100%" height="100%"/>

                    </mx:Panel>

               

                    <mx:Panel width="100%" height="100%" layout="absolute" id="panel2" label="Panel 2" title="Panel 2" titleIcon="@Embed(source='resources/panel_icon.png')">

                          <mx:DataGrid id="grid2" width="100%" height="100%" />

                    </mx:Panel>

               

                    <mx:Panel width="100%" height="100%" layout="absolute" id="panel3" label="Panel 3" title="Panel 3" titleIcon="@Embed(source='resources/panel_icon.png')">

                          <mx:DataGrid id="grid3" width="100%" height="100%"/>

                    </mx:Panel>

              </mx:ViewStack>

              • 4. Re: controls inside viewstack not showing full height...
                xandesign Level 1

                I tried that but it didn't work, however the code I posted yesterday was within a VBOX which had height="100" instead of height="100%". Once I made that change everything streached to take up the whole screen.

                 

                Thanks for pointing me in the right direction.