2 Replies Latest reply on Jul 24, 2008 8:17 AM by kilyas2007

    text alignment in a form

    kilyas2007 Level 1
      I have a form with various fileds like:-

      Name
      Address
      Fax

      etc., Now I want the labels in the form to be left aligned and the tex input fields to be aligned right, for the purpose I am using the following code:-


      <mx:FormItem label="Company Id" textAlign="left">
      <mx:TextInput id="companyId" data="{model.companyId}" enabled="{model.comapanyIdEditable}" styleName="gradientRectangleSkin" textAlign="right"/>
      </mx:FormItem>


      This however doesn't seem to work, what is it that I am missing?

      Thanks in advance.
        • 1. Re: text alignment in a form
          Developer504 Level 1
          quote:

          Originally posted by: kilyas2007
          I have a form with various fileds like:-

          Name
          Address
          Fax

          etc., Now I want the labels in the form to be left aligned and the tex input fields to be aligned right, for the purpose I am using the following code:-


          <mx:FormItem label="Company Id" textAlign="left">
          <mx:TextInput id="companyId" data="{model.companyId}" enabled="{model.comapanyIdEditable}" styleName="gradientRectangleSkin" textAlign="right"/>
          </mx:FormItem>


          This however doesn't seem to work, what is it that I am missing?

          Thanks in advance.


          Have you set layout="Absolute" on your app?

          • 2. Re: text alignment in a form
            kilyas2007 Level 1
            If I set the layout to absolute I would have to specify the location coordinates of all the inputs or else they would stack on top of eachother, this is something I don't want to do. Are there any other options?