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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:14:21+00:00 2026-05-12T21:14:21+00:00

I need to programmatically add a set of controls with some amount of pixels

  • 0

I need to programmatically add a set of controls with some amount of pixels between them. I can’t seem to find how to do this in the Flex docs. How can I do it?

  • 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-12T21:14:22+00:00Added an answer on May 12, 2026 at 9:14 pm

    Most Containers have some logic to place the items for you, e.g. vertically or horizontally. I.e. if you want to place them horizontally with 5 pixels of space you would use a HBox (VBox for vertical layout):

    <mx:HBox horizontalGap="5">
       <Component1/>
       <Component2/>
       <etc.../>
    </mx:HBox>
    

    Or script:

    ...
    var box: HBox = new HBox();
    box.horizontalGap = 5;
    box.addChild(new Component1());
    box.addChild(new Component2());
    addChild(box);
    

    But if you want to place them yourself using x,y coordinates (i.e. absolute positioning) you can use Canvas:

    <mx:Canvas>
       <Component1 x="100" y="100"/>
       <Component2 x="100" y="200"/>
       <etc.../>
    </mx:Canvas>
    

    script version:

    var canvas: Canvas = new Canvas();
    var component1: Component1 = new Component1();
    component1.x = 100;
    component1.y = 100;
    canvas.addChild(component1);
    var component2: Component2 = new Component2();
    component2.x = 100;
    component2.y = 100;
    canvas.addChild(component2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RichTextBox and I add some texts programatically. I need to display
I need to programmatically set up a node reference field. My module successfully creates
I'm using xmlhttp via vba in excel 2010. I need to programmatically add an
Is there a way that I can Programmatically set an Expires Header in code
I am writing an internal DSL in Ruby. For this, I need to programmatically
I need to programmatically set the focus to an editor instance after initializing it.
I need to add a cron job thru a script I run to set
I need to programmatically add string translation (for example to translate taxonomy terms). Is
I have a situation where I need to programmatically set something that has a
I need to programmatically install (In Ubuntu) few hundreds of fonts for my application

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.