4 Replies Latest reply on Sep 27, 2010 10:31 AM by Flex harUI

    size issue

    bindu84
      I want to resize a component when user resize the browser,
      My componet (Child) always take  the old size of the container on resizing
      I have check the size in in updatdisplay list of child but the size is showing old one.

       

      override protected function updateDisplayList (unscaledWidth:Number, unscaledHeight:Number):void

      {

       

      super.updateDisplayList(unscaledWidth, unscaledHeight);

       

       

      this.height = unscaledHeight;

       

      this.width = unscaledWidth;

      }

        • 1. Re: size issue
          BhaskerChari Level 4

          Hi Bindu,

           

          Have you given the height of your component in percentages..?? What the component you are using ..?? Can you share some more code of the problem you are facing..??

           

           

          Thanks,

          Bhasker

          • 2. Re: size issue
            bindu84 Level 1

            i have attachede a little part of code . i have made my wn component extended by panel highlighted in red

             

             

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:view="com.rsg.maincontroller.view.*"
            xmlns:control="com.rsg.maincontroller.control.*"
            xmlns:services="com.rsg.maincontroller.services.*"
            initialize="onCreationComplete();"
            layout="absolute">

            <mx:Style  source=" /assets/styles.css " />

            <mx:Script>
              <![CDATA[
                
               [Bindable]
               public var controllermodel : MainControllerModelLocator = MainControllerModelLocator.getInstance();
               public var myTimer:Timer;
              
             

               private function onCreationComplete() : void
               {
                
                controllermodel.objPageController = pagecontroller;
                this.addEventListener("INT_LOGOUTEVENT",handlelogout)
                initTimer();
                sideControllerWidth = sideControllerBox.width;
               
               }
              
                
               override protected function updateDisplayList (unscaledWidth:Number, unscaledHeight:Number):void
                     {
                         super.updateDisplayList(unscaledWidth, unscaledHeight);
                         this.height = unscaledHeight;
                         this.width = unscaledWidth;
              
              
              ]]>
            </mx:Script>

            <!-- the FrontController, containing Commands specific to this appliation -->
            <control:ActivateController id="controller" />

            <!-- the Services, containing web services -->
            <services:Services id="service" />

            <mx:VBox id="maincontroller" height="100%" width="100%"  verticalGap="0" horizontalScrollPolicy="off" verticalScrollPolicy="off">

              <view:HeaderController id="headercontroller1" height="84" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
              </view:HeaderController>

              <mx:HBox id="sidepageController" height="100%" width="100%" verticalGap="0" paddingTop="0" horizontalGap="0" autoLayout="true">
               <mx:VBox id="sideControllerBox" minWidth="236" horizontalScrollPolicy="off" verticalScrollPolicy="off" height="100%" width="253" autoLayout="true">
                <view:SideController id="sideController" width="253" height="100%">
                </view:SideController>
                <mx:VBox id="imageBox" verticalGap="0" paddingTop="0" width="253" styleName="sideControllerSlider">
                 <mx:Image source="{isClosed == false?(closeNav):openNav}" useHandCursor="true" buttonMode="true" mouseChildren="false"
                        id="closeNavBtn" click="discloseNav()"/>
                </mx:VBox>
               </mx:VBox>
               <view:PageController id="pagecontroller" height="100%" width="100%">
               </view:PageController>
              </mx:HBox>
            </mx:VBox>

            </mx:Application>

            • 3. Re: size issue
              BhaskerChari Level 4

              Hi Bindu,

               

              Try to set the width="100%" height="100%" on <mx:Application /> root tag...and check it..

               

              <mx:Application width="100%" height="100%" />

               

               

              Thanks,

              Bhasker

              • 4. Re: size issue
                Flex harUI Adobe Employee

                Parents size their children.  Make sure the parent's sizes are correct.