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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:28:23+00:00 2026-06-16T20:28:23+00:00

i have this function in my project public function changeFormItemsLabelWidth(form:Form, width:int):void { var formItemsArray:Array

  • 0

i have this function in my project

public function changeFormItemsLabelWidth(form:Form, width:int):void
{
    var formItemsArray:Array = form.getChildren();
    for( var i:int = 0; i < formItemsArray.length; i++){
        if(formItemsArray[i].className == "FormItem"){
            var formItem:FormItem = formItemsArray[i] as FormItem;
            formItem.setStyle("labelWidth", width);
        }
    }

and i’m getting this error:

1061: Call to a possibly undefined method getChildren through a reference with static type spark.components:Form.

Can someone tell me how can i replace getchildren method? because i’m migration to flex 4 and this method no longer exists.

EDIT:

Tanks for the help i did something like this and it works

public function changeFormItemsLabelWidth(form:Form, width:int):void
{

    var it:int = 0;
    var n:int = form.numElements;
    for (it; it < n; it++)
    {
        var formItemsArray:Array = form.getElementAt(it) as Array;
    }

    for( var i:int = 0; i < formItemsArray.length; i++){
        if(formItemsArray[i].className == "FormItem"){
            var formItem:FormItem = formItemsArray[i] as FormItem;
            formItem.setStyle("labelWidth", width);
        }
    }
}
  • 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-06-16T20:28:25+00:00Added an answer on June 16, 2026 at 8:28 pm

    You’ll need to use form.numElements and iterate. Each element is reachable via form.getElementAt( iterator ).

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

Sidebar

Related Questions

I have this function: int firstHeapArray (IntHeapArray h) { if(!emptyHeapArray(h)) return h.array[0]; } It's
I currently have a function that looks like this: public void AnimateLayoutTransform(object ControlToAnimate) {
I have one form: FormPrincipal.cs In this form there is a public method called
I have this function in vb.net that I converted from C# for a project
I have this Function/Method for filtering out a Blacklist of words in an ARRAY()
In my current project, I have a function with argument (e.g., int badgID in
i try select one id in a cakephp. I have this: public function start($id
Suppose I have a free function called InitFoo . I'd like to protect this
I have this function // add history paths and save data function AddPath( strTag,
I have this function to create a request to another file to update the

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.