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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 283k
  • Answers 283k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can't revoque an AppStore certificate. I think you are… May 13, 2026 at 4:19 pm
  • Editorial Team
    Editorial Team added an answer Yes, the (new) WCF way to do this is to… May 13, 2026 at 4:19 pm
  • Editorial Team
    Editorial Team added an answer <iframe src="http://www.facebook.com/" /> I have not tested, but I suspect… May 13, 2026 at 4:19 pm

Related Questions

I'm doing some binding in .Net 2.0. It's been a hassle! I have a
I'm trying to wrap my head around asp.net. I have a background as a
I have a set of controls bound to data, on which I would like
In my Silverlight 3 user control I am showing a basic DataGrid control. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.