1 Reply Latest reply on May 24, 2010 3:12 AM by samschauhan

    A question about x and Y Attributes in Flex Framework

    kiran7881 Level 1
      Hi

       

      When we define a control or componet in Flex Framework , what will the role played by X and Y attributes for that component and how is this different from Height and width of that component

       

      Please share your knowledge
        • 1. Re: A question about x and Y Attributes in Flex Framework
          samschauhan Level 1

          First, height and width as the names suggest depict the Height and Width of the component.

           

          For example, <mx:Button id="button1" height="20" width="85" label="Button"/>

           

          Here the button1 has Height of 20 pixels and Width of 85 pixels.

           

          Second, x and y properties define the location of the component within its immediate parent Container.

           

          For example,

           

          <mx:TitleWindow x="434" y="107" width="250" height="200" layout="absolute">
                  <mx:Button x="53" y="54" id="button1" height="20" width="85" label="Button"/>
          </mx:TitleWindow>

           

          Here the x and y properties are relative to the TitleWindow.

           

          See the snapshot:

           

           

          Image.JPG

           

           

           

          So in this image the Button is at location x=53 and y=54.

           

           

          Regards,

          SAM