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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:33:09+00:00 2026-05-29T18:33:09+00:00

In general, I haven’t yet found a definitive way to get Flex and Spark

  • 0

In general, I haven’t yet found a definitive way to get Flex and Spark containers to size themselves relative to their children. I have searched for good documentation for this concept many times but have yet to find anything that sufficiently explains the concepts.

A simple example of something I often want to do is to draw a border uniformly around a set of controls.
The goal here would be to have all UI elements to size themselves automatically.

<s:BorderContainer>
  <s:HGroup>
    <s:Label text="l1" />
    <s:Label text="very long label 2" />
  </s:HGroup>
</s:BorderContainer>

I would want the Labels to size themselves based on the text property, and the HGroup should be as big as needed to contain labels and BorderContainer should only just contain that HGroup.

Now this simple example may or may not work as desired, I haven’t yet figured out how to determine what the output will look like without trying the code. Does anyone know of a good way to understand this process so I can know deterministically how things will look?


Now the more complicated example that I am working on now.
I have a class that extends the BorderContainer. Within the class I create an HGroup with 5 Labels as children of the HGroup. Then the HGroup is added as a child of the ExtendedBorderContainer (using addElement() method).

Then the new class is used in the application as:

<mx:ViewStack>
  <s:NavigatorContent>
    <my:ExtendedBorderContainer />
  </s:NavigatorContent>
  <!-- more NavigatorContents here -->
</mx:ViewStack>

I have tried various [max|min]height/width combinations and I can not get the desired layout, which is very tight borders around elements without extraneous space starting from the deepest Label children all the way up to the NavigatorContent.

  • 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-29T18:33:10+00:00Added an answer on May 29, 2026 at 6:33 pm

    Look here:
    http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_3.html

    It is not clear what your problem is.
    Regarding first part of your question: what do you mean saying “may or may not work as desired”. This example should work and have layout that you described. Label sizes itself based on text property and so on. What behaviour do you get?

    Second part:
    If you are hinting that your layout is ok in general but have extra spacing between items then look at the padding and gap properties of containers. Some containers have non zero default padding and gap and you have to override them manualy.

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

Sidebar

Related Questions

Well, sorry for the question, is more like a general culture one (haven't found
There is a very simple problem I haven't found any solution that solves it.
I have a question about the general functionality of PHP that I haven't been
I haven't found any documentation or tutorials on this topic, haven't received any answers
This is probably a very basic question but I haven't found any detailed information
I have done a little research here on SO and haven't found exactly what
I've tried looking for answers to get this working but haven't managed to do
This is a general question I haven't seen an answer for. Can I tell
I just have a general question I haven't been able to find the answer
I've decided to get back into LISP (haven't used it since my AI classes)

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.