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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:09:51+00:00 2026-05-19T12:09:51+00:00

I’d like to get the actual height of a component after adding some children.

  • 0

I’d like to get the actual height of a component after adding some children.

When inspecting the variables tab in debug mode, I see 2 different height variables:
$height (which contains the correct value: 138) and height/_height (which contains a wrong value: 10).

I guess that the display is not updated and so I’m not getting the correct height using component.height, but how can I get the value in $height?

Thanks for any help you can provide =)

Regards,
BS_C3


@Flextras

Again, thanks a lot for your answer! That was really detailed =)

Measuredheight is not giving me the value I’m looking for, and explicitHeight has no value (NaN). I cannot test right now, so I can’t tell for unscaledHeight…

Here’s the structure of what I have:

MainContainer - Canvas
    BOX1 - Canvas (height = 100)
    BOX2 - Canvas (height = 100)
    VariableBox - Canvas (height: depends on the height of it's variable number of children)
    Text - TextArea

I need the VariableBox’s height in order to position Text.

The function looks like this:

updateDisplay(){
    for(i;i<list.length;i++){
        VariableBox.addChild(new HBox);
    }
    // reposition Text depending on VariableBox's height
}

I know I’m not giving any code but I’m not on my working computer right now >_<

Hope this helps!!

  • 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-19T12:09:52+00:00Added an answer on May 19, 2026 at 12:09 pm

    Final solution:

    I finally found some workaround that’s satisfying for me without doing some extravagant stuff…

    I had a parent container to which I was dynamically adding some children, and it’s height wasn’t getting updated. The issue I was having is that neither measuredHeight, nor explicitHeight, nor height, nor unscaledHeight of the parent container were giving me the height I needed when I wanted it.

    So, I added a listener to the creationComplete of each child. Once the creation complete event is launched, every control of the child is taken into account. At this moment, the measuredHeight of the parent container is set to the expected value. So I just needed to set:

    parentContainer.height = parentContainer.measuredHeight
    

    Thanks again to Flextras who has given some useful information =)

    Regards.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

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.