Results 1 to 3 of 3

Thread: Label alignments issue in extjs form

  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    2

    Default Label alignments issue in extjs form

    I am working on extjs 3.4 . I want to use both left and right label alignments in my form. Is it possible to have labelAlign property at each field (textfield, combobox etc) level. If so, please provide a sample code to achieve this. It a bit urgent for my task. Tanks in advance.

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore,IN
    Posts
    114
    Answers
    6

    Default

    Put the below inside items property.


    Code:
          {
               xtype: 'textfield',
               fieldLabel: 'Your Email Address',              
               vtype: 'email',
               allowBlank: false,
               labelAlign: 'top',
           }, {
                 xtype: 'textfield',
                 fieldLabel: 'Subject', 
                 allowBlank: false, 
                 labelAlign: 'left',
             }
    Last edited by gameboy87; 5 Mar 2013 at 2:28 AM. Reason: indent was improper

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    81
    Answers
    2

    Default

    what ever item you add will be aligned to left.... if you want to align you items to right side you must add -> or tbar{align:right}

    like this


    {xtype:'textfield'},
    {xtype:'textfield'},//these will be aligned to left
    {->},
    {xtype:'textfield'},
    {xtype:'textfield'},// and these will be on right side

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •