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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:21:07+00:00 2026-06-01T03:21:07+00:00

I am a little confused about the setActualSize method. It appears from what I’ve

  • 0

I am a little confused about the setActualSize method. It appears from what I’ve read, that if it is not called on a component by its parent, the component will not be rendered.

So it appears that setActualSize is a critical method that is directly bound to rendering the UIComponent. It also appears that the width and height properties of UIComponent override the functionality of the width and height properties of flash.display.DisplayObject, in that they are not directly bound to the rendering of the object but are virtual values that are mainly used by the getExplicitOrMeasured when the parent of the component calls the component’s setActualSize method.

So the question are:

1) Why isn’t the default behavior of every component to just call setActualSize(getExplicitOrMeasuredWidth(),getExplicitOrMeasuredHeight()) on itself?

2) I guess this question stems from the above question and the behavior as I understand it as described above: does setActualSize change the visibility of the component?

It appears that that the behavior is that a component is not rendered until setActualSize is called, but if it contains display object children itself (expected behavior as it can calculate measure on itself) and is added to the display list, the only reason why flash isn’t rendering it, is because its not visible.

  • 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-06-01T03:21:10+00:00Added an answer on June 1, 2026 at 3:21 am

    The answers to your questions are in the way the Flex component life cycle works, consider these two phases:

    measurement:
    The Flex framework will call the measure() method of your component. You can override this method to set a default and/or minimum size for your component.

    Flex components first measure themselves to provide a default and/or minimum size suggestion to the layout/container classes. Flex does this from a bottom up approach, so that the lowest level objects are measured first. Thus when each parent object measures itself, the preferred sizes of it’s child objects has been established.

    rendering:
    Later Flex calls the updateDisplayList() method of your component. You can override this to size/position your component’s child objects. This is where setActualSize() is intended to be used: the parent calls setActualSize() on it’s child objects, not on itself.

    Note the method signature of updateDisplayList():

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

    Measurement was done from the bottom up. However, rendering is done from the top down. So at render time, updateDisplayList(unscaledWidth, unscaledHeight) gets executed on your component. Flex is telling your component the space it has been allotted to render itself, and your component must size/position it’s child objects accordingly and/or do programtic drawing.

    The sizes passed in to updateDisplayList() are based on various factors:

    • how/if you override the measure() method (measure is not called when
      your component has a fixed width/height)
    • the types of sizing
      parameters (fixed, percent, constraint) and layouts that you use

    An old but good resource on this topic

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

Sidebar

Related Questions

I am a little confused about how can I read each argument from the
I'm a little confused about how to properly declare a class inherited from a
I'm a little confused about which jQuery method and/or selectors to use when trying
I'm a little confused about how to do something that I thought would be
I am little confused about Java frameworks (I am coming from .NET). Do you
I'm little confused about controller and model in MVC framework (codeIgniter). Its clear to
I'm a little confused about raising an event in Objective-C, I came from C#
I'm a little confused about MongoDB's read locking. How many concurrent read operations can
Little confused about the message from Analyze command in Xcode 4.2. It complains about
I'm a little confused about how the standard library will behave now that Python

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.