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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:13:26+00:00 2026-05-11T18:13:26+00:00

If you are extending UIComponent and you add a Label component to your custom

  • 0

If you are extending UIComponent and you add a Label component to your custom component it seems you have to use setActualSize() in order for your label to appear. The problem is I don’t know what size the label is going to be as it depends on the length of the text and the font size. Sometimes this works:

label.setActualSize(label.getExplicitOrMeasuredWidth(),
    label.getExplicitOrMeasuredHeight())

but not always. I’m not sure of the reason for this.

What’s the best way to set a label to its actual size?

thanks

  • 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-11T18:13:26+00:00Added an answer on May 11, 2026 at 6:13 pm

    Make sure you call setActualSize() on the Label in your UIComponent’s updateDisplayList() function. That’s where it’s supposed to happen. If you call it anywhere else in the validation cycle, the child Label may not have finished measurement.

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

Sidebar

Related Questions

I have a component extending a Spark List, and when I scroll using the
I need to create a custom component in Flex 4.5 by extending the spark
When extending classes, I find it very descriptive to use the base ( MyBase
I have a class extending mysqli. It follows a singleton pattern so I have
I have a class extending android.os.Handler . An instance of this handler is passed
I'm extending a custom Android kernel fork that originated as a 2.2 Froyo kernel.
I was thinking about extending all my controllers from the indexController. I have in
When extending with doLayout you can only have one sub-template, but you can include
I'm having troubles extending the Application class to declare global variables. I have extended
I have my own custom UI that renders email. but it renders only text

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.