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 6926315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:54:08+00:00 2026-05-27T10:54:08+00:00

I am attempting to implement a layout in Adobe Flex 4.5 / MXML where

  • 0

I am attempting to implement a layout in Adobe Flex 4.5 / MXML where I have multiple controls in an HBox that – in total – consume all available horizontal screen estate. Some use a relative with (percentage), some an absolute width (pixels) and one is supposed to consume whatever space is still left, such as:

+----------------------+-----------------------+------+
|         35%          |      fill parent      | 10px |
+----------------------+-----------------------+------+

How would I achieve this in Flex (is there something comparable to Android’s layout_width="fillparent")?

Due to the fact that there are elements that have an absolute width I cannot easily calculate the width of the filler as a percentage a priori (as it varies with the screen width).

Setting the filler’s width to 100% also does not work as this will shrink the 35% area below 35%.

Edit: Applying the updateDisplayList suggestion from http://www.Flextras.com’s answer below yields the error “Call to a possibly undefined method updateDisplayList” at the line marked in the source excerpt below:

<?xml version="1.0"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         creationPolicy="auto"
         width="100%"
         verticalGap="0">
    [...]
    <fx:Script>
        <![CDATA[
            [...]
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
                ^^^^

            headerLinkBox1.width = unscaledWidth * 0.375;
            headerLinkBox2.width = unscaledWidth * 0.2;
            headerLinkBox3.width = unscaledWidth - headerLinkBox4.width - headerLinkBox5.width - headerLinkBox6.width;

            headerLinkBox1.x = 0;
            headerLinkBox2.x = headerLinkBox1.x + headerLinkBox2.width;
            headerLinkBox3.x = headerLinkBox2.x + headerLinkBox3.width;
            headerLinkBox4.x = headerLinkBox3.x + headerLinkBox4.width;
            headerLinkBox5.x = headerLinkBox4.x + headerLinkBox5.width;
            headerLinkBox6.x = headerLinkBox5.x + headerLinkBox6.width;
        }

        [...]
  • 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-27T10:54:09+00:00Added an answer on May 27, 2026 at 10:54 am

    You make use of the Flex Component lifecycle and write your own layout code in updateDisplayList. Conceptually something like this:

    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
      super.updateDisplayList(unscaledWidth, unscaledHeight);
      // size the components
      comp1.width = unscaledWidth*.35
      comp2.width = unscaledWidth-10-comp1.width
      comp3.width = 10;
      // position the components
      comp1.x = 0;
      comp2.x = comp1.width;
      comp3.x = comp2.x + comp2.width;
    }
    

    You’ll probably want to set the height of each component to, possibly using the getExplicitOrMeasuredHeight() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web form that I am attempting to implement dynamic drop down
I'm attempting to implement OpenID with ASP.NET MVC (Yeah, we haven't heard that one
I'm attempting to implement this paper . I've have most of it down, but
I'm attempting to implement a phpBB library into Kohana. I have created a vendor
I am attempting to implement a pagination bar above a table. I have a
I am attempting to implement xmpp chat/collaboration between two C# desktop clients that exchange
I have been attempting to implement a custom dojo build to replace the dojo
I am attempting to implement a function that sorts a randomly generated vector using
I'm attempting to implement a Microsoft Pivot viewer within my application, I've decided that
I am attempting to implement an extension table structure for some stats that I

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.