1 Reply Latest reply on Jan 19, 2007 11:44 AM by peterent

    WIDTH of an object

    richardbrenkley Level 1
      i have inherited a flex application and am trying to resolve what should be a simple issue.

      there's a navigation menu called mySubCatBox which is generated dynamically from XML data. I need to determine the width of this object, but the following always returns a value of 0:


      I'll send the source file to anyone who feels inclined to take a look at it
        • 1. Re: WIDTH of an object
          peterent Level 2
          The width being zero can be for several reasons, but utimately because it hasn't been realized yet (or has been explicity set to zero). For example, components created dynamically have a default width and height of zero. It is generally up to their parent containers to size them, explicity setting their width and height, or the component overrides the measure function and sets its own size.

          For example:
          var submit:Button = new Button();
          submit.label = "Submit";

          The button will not appear because it is 0x0. You have to specify the size.