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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:07:13+00:00 2026-05-17T20:07:13+00:00

i am trying to add a container having some UI components as child in

  • 0

i am trying to add a container having some UI components as child in it to a canvas and also want to set the border size only using the action script without MXML,

1) is it possible to add the container that is a lower class in hierarchy from parent to child upward, can canvas addchild() accepts the container as child ?

2) how to set the border of both the canvas and the container ?

i need to do this in action script i have tried but nothing comes out here is the code: –

var contain:Container = new Container();

            if(ename.text.length >0)
            {
                var newename:TextInput = new TextInput();
                var newnamet:Label = new Label();

                newnamet.text = namet.text;
                newnamet.x = 5;

                newename.text = ename.text;
                newename.x = 100;
                newnamet.y = newename.y = 20+contain.measuredHeight;

                contain.addChild(newnamet);
                contain.addChild(newename);
                //contain.measure();

            }//end if


                    contain.x=5;
        contain.y =20+childcanvas.measuredHeight;
        childcanvas.addChild(contain);
  • 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-17T20:07:13+00:00Added an answer on May 17, 2026 at 8:07 pm

    Taken from the docs:

    The Container class is an abstract base class for components that 
    controls the layout characteristics of child components. 
    You do not create an instance of Container in an application. 
    Instead, you create an instance of one of Container's subclasses, 
    such as Canvas or HBox.
    
    The Container class contains the logic for scrolling, clipping, 
    and dynamic instantiation. It contains methods for adding and 
    removing children. It also contains the getChildAt() method, 
    and the logic for drawing the background and borders of containers.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add functionality to the v8sharp project and I'm having some issues
I'm currently trying to implement the A* pathfinding algorithm using C++. I'm having some
I'm trying to add generic service support to our IoC container, and I have
I'm trying add a tab to my web page that looks like this: Using
Trying to add the ability to delete a Folder using FTP and all subfolders
I've been trying to add some selected items from a multi-select listbox on my
I'm trying to write a simple game to teach some basic Welsh using the
I'm having some troubles trying to save a singleton object to the iPhone disk.
I am dynamically trying to populate a multidimensional array and having some trouble. I
I'm trying to get a custom template tag to work but am having some

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.