Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:18:08+00:00 2026-05-25T03:18:08+00:00

In Flex 3, I used to be able to take 2 panels, lay them

  • 0

In Flex 3, I used to be able to take 2 panels, lay them out with 100% width settings in an HBox. If I changed the width property of the first panel to something smaller, let’s say 20%, the second would automatically update and fill in the space that used to be taken up by the first as the first resized down.

I notice in spark, this doesn’t happen. I have an app with a HorizontalLayout, and a resizable panel control on the left and a panel on the right that has width=”100%.” When I resize my left-side panel down, the right side panel doesn’t do anything. So I end up with a clean resizable panel, a bunch of wasted space, and my right-side panel just sitting there.

What I expect is that since the right-side panel has a width=”100%” then if the panel to its left is resized, then there would be a corresponding growth in the right-side panel to fill in.

I’ve tried to manually trigger validation on properties and size without effect. I’m wondering what changed in the HorizontalLayout that no longer allows this technique to work. I would also like to know what solutions are available?

Here’s some chomp chomp:

<mx:Application>

   <mx:Script>
      <![CDATA[

         protected function resizeClick(event:MouseEvent):void
         {
            pnl1.percentWidth = 10;  // When this would execute, pnl2 would automatically
                                     // fill in the space previously held by pnl1.
         }

      ]]>
   </mx:Script>
   <mx:HBox width="100%" height="100%">
      <mx:Panel id="pnl1" width="40%" height="100%">  // Uses 40%
         <mx:Button id="resizeButton" click="resizeClick(event)"/>
      </mx:Panel>
      <mx:Panel id="pnl2" width="100%" height="100%"/>  // Fills in the rest of the available space
   </mx:HBox>
</mx:Application>

Flex 4.5 doesn’t automatically update the size of pnl2 when the size of pnl1 changes. I would think that since a HorizontalLayout is being used, that both children would update when the width of one of them was changed. But that just doesn’t seem to be the case. I know I can create two states to accomplish this, but I was thinking that I shouldn’t have to for something so trivial.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:18:08+00:00Added an answer on May 25, 2026 at 3:18 am

    So this is how I eventually solved this problem. I should have been a little more specific in my post to explain that Panel 1 is actually a “collapsible” panel that modifies its own size whenever its header button is clicked. The example above does work, but since there is no numeric control on the view to “tell” the panel.percentWidth property how much to change, I set my collapsible panel up to dispatch custom events that are handled by the wrapper. The custom events basically indicate what is happening to the collapsible panel. From there, I can handle the events separately and then control the size of Panel 2.

    The solution is actually rather simple and I was hoping for something a little more “behind the scenes” but this worked fine.

    <s:Application initialize="initApp(event)">
    
       <fx:Script>
          <![CDATA[
    
             protected function initApp(event:FlexEvent):void
             {
                  this.addEventListener("PanelCollapse", panelHandler);
                  this.addEventListener("PanelNormal", panelHandler);
             }    
    
             protected function panelHandler(event:Event):void
             {
                 switch(event.type)
                 {
                    case "PanelCollapse":
                       pnl2.percentWidth = 100;
                       break;
                    case "PanelNormal":
                       pnl2.percentWidth = 60;
                       break;
                 }
             }
          ]]>
       </fx:Script>
    
          <comp:CollapsiblePanel id="pnl1" width="40%" height="100%">
    
          </mx:Panel>
          <s:Panel id="pnl2" width="100%" height="100%"/>  // Fills in the rest of the available space
    
    </s:Application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running my first project that I'm compiling with flex builder. Before I used
I was trying to find a bandwidth profiler in flex like there used to
I am a Flex developer and never used CGI before. I wanted to create
How many of you already used the Prana Framework for AS3 (Flex/Flash) or heard
I have an app that uses Spring security and BlazeDS. Flex 3.2 is used
I have used Flex for about a year before deciding that I would rather
I have some config files (.xml's) used by my flex app sitting on remote
Driven on by curiosity, I’m trying to understand the Life Cycle used by Flex
i used blue.css and also beige.css in flex .i have theme combobox for user
I want to connect Java and FLEX. I have never used Java and also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.