6 Replies Latest reply on Jan 21, 2010 3:46 PM by cyber0897

    I am unable to set percent height on a panel

    cyber0897 Level 1

      hey guys... so im trying to have my panel be 100% of the window...

      so when i make the browser smaller i want the list to become smaller... ive tried doing

       

      <panel width="250" height"100%"> but that dosent work...

       

      any ideas why?

        • 1. Re: I am unable to set percent height on a panel
          kevinklin Adobe Employee

          Hi,

           

          Did you set an explicit height on your application? That may be preventing the Panel from resizing.

           

          -Kevin

          1 person found this helpful
          • 2. Re: I am unable to set percent height on a panel
            cyber0897 Level 1

            hmm... in my application i have

             

            <?xml version="1.0" encoding="utf-8"?>
            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                              xmlns:s="library://ns.adobe.com/flex/spark" 
                              xmlns:mx="library://ns.adobe.com/flex/mx" maxWidth="1024" maxHeight="768"
                              creationComplete="init();" xmlns:loginSuccess="modules.loginSuccess.*">
                 ....
                 .....
                 <s:states>
                      <s:State name="login" />
                      <s:State name="loginSuccess" />
                 </s:states>
                 
                 <loginSuccess:loginSuccess includeIn="loginSuccess" height="100%" width="100%" verticalCenter="0" horizontalCenter="0" />
                 
                 <mx:Canvas borderColor="#333333" horizontalCenter="0" verticalCenter="0" includeIn="login">
                 .....
                 ...
                 </mx:Canvas>
            </s:Application>
            
            

             

            and in my login success i have

             

            <?xml version="1.0" encoding="utf-8"?>
            <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
                       xmlns:imageHandler="modules.imageHandler.*">
                 
            
                 
                 <s:HGroup horizontalCenter="0">
                      <s:Panel id="navContainer" width="250" height="100%">
                           <s:List id="nav" width="250" height="100%" dataProvider="{sourceData}" click="updateStack()" />
                      </s:Panel>
                 </s:HGroup>
                 
            </s:Group>
            
            

             

             

            i dont want my application to be way big, i need a maxheight of 768 and max width of 1024...

            • 3. Re: I am unable to set percent height on a panel
              kevinklin Adobe Employee

              hmm...try setting height="100%" on the HGroup in your loginsuccess component? Let me know if that works.

               

              Thanks,

              -Kevin

              • 4. Re: I am unable to set percent height on a panel
                cyber0897 Level 1

                wow.. lol that worked!! thanks a lot kevin!!


                • 5. Re: I am unable to set percent height on a panel
                  Flex harUI Adobe Employee

                  What happened when you did that?

                  • 6. Re: I am unable to set percent height on a panel
                    cyber0897 Level 1

                    i set the height on the hgroup and that worked...