5 Replies Latest reply on Apr 12, 2011 3:29 AM by Loic.Aigon

    Is it possible to extend a panel (not by hand)

    Loic.Aigon Adobe Community Professional

      Hi,

       

      Is it possible to get a panel being extended or reduced. The panel has to show/hide informations. Depending on that, the panel ha to be enlarged or reduced. Is it possible ?

       

      Best,

       

      Loic

        • 1. Re: Is it possible to extend a panel (not by hand)
          Harbs. Adobe Community Professional & MVP

          Yes. You can set the size of the panel, but the app needs to be a CSXSWindowedApplication.

           

          Harbs

          • 2. Re: Is it possible to extend a panel (not by hand)
            Loic.Aigon Adobe Community Professional

            Hi Harbs,

             

            Thanks a lot

            • 3. Solved : Is it possible to extend a panel (not by hand)
              Loic.Aigon Adobe Community Professional

              Hi all,

               

              Ok I found this and tried to applied without success :

               

               

              var winGeom:WindowGeometry = new WindowGeometry();
               winGeom.width = 100;
               winGeom.height = 200;
               CSXSInterface.getInstance().requestStateChange(StateChangeEvent.WINDOW_RESIZE, winGeom);
              

               

               

              here is the beginning of my mxml code :

               

               

              <csxs:CSXSWindowedApplication
                   xmlns:csxs="com.adobe.csxs.core.*"
                   xmlns:mx="http://www.adobe.com/2006/mxml"
                   layout="absolute" width="350" height="445" backgroundColor="#ECE9D8" close="removeHandler()" creationComplete="addHandler()">
                   <mx:Style source="styles.css"></mx:Style>
                   <mx:Script>
                        <![CDATA[
                             import com.adobe.csawlib.CSHostObject;
                             import com.adobe.csawlib.indesign.*;
                             import com.adobe.cshostadapter.*;
                             import com.adobe.csxs.core.CSXSInterface;
                             import com.adobe.csxs.events.MenuClickEvent;
                             import com.adobe.csxs.types.CSXSWindowType;
                             import com.adobe.csxs.types.SyncRequestResult;
                             import com.adobe.indesign.Application;
                             import com.adobe.indesign.Event;
                             import mx.controls.Alert;
              
              

               

               

              What do I do wrong ? Do I need to import something more ?

               

              I get these errors

               

               

              1046: Type was not found or was not a compile-time constant: WindowGeometry

               

              1120: Access of undefined property StateChangeEvent.

               

              1180: Call to a possibly undefined method WindowGeometry.

               

              Thanks for the hints

               

              Loic

               

               

               

              Sorry but I found it :

              import com.adobe.csxs.types.*;
              import com.adobe.csxs.events.*;
              
              

              • 4. Re: Is it possible to extend a panel (not by hand)
                Harbs. Adobe Community Professional & MVP

                The StateChangeEvents are broken.

                 

                Set the width and height of the app directly.

                 

                Harbs

                • 5. Re: Is it possible to extend a panel (not by hand)
                  Loic.Aigon Adobe Community Professional

                  Hi Harbs,

                   

                  Looks like it is working here

                   

                  private function resizeExtension(w:int,h:int):void{
                       var winGeom:WindowGeometry = new WindowGeometry();
                       winGeom.width = w;
                       winGeom.height = h;
                       CSXSInterface.getInstance().requestStateChange(StateChangeEvent.WINDOW_RESIZE, winGeom);
                  }
                  
                  

                   

                  I got resizing working fine.

                   

                  Loic