Results 1 to 8 of 8

Thread: Label for a ComboBox

  1. #1

    Question Label for a ComboBox

    Can anyone tell, how to insert label for a ComboBox? I means a descriptive label which appears in front of the ComboBox.

  2. #2
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    add this as one of your config option:

    Code:
    {
    
    fieldLabel:'urLabelName',
    
    }
    I Meet Challenge with Excitement & My Only Gossip is Love

  3. #3

    Default

    Well I have already tried this. But for some reason the label is not appearing.

  4. #4
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    then it must be a layout problem, please try changing the layout, still if it does not work, then please post your code.
    I Meet Challenge with Excitement & My Only Gossip is Love

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Posts
    56

    Default

    if the your layout is mentioned as 'column' , fieldLabel wont be visible

  6. #6
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    that's not true, if the layout is column, then you have to define the items accordingly.
    I Meet Challenge with Excitement & My Only Gossip is Love

  7. #7
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    fieldLabels are only visible in a form layout.

    If you are using a different layout then you need to nest an extra container, e.g.
    Code:
    layout: 'column',
    items: [{
      xtype: 'container',
      columnWidth: 0.5,
      layout: 'form',
      items: {
        xtype: 'textfield',
        fieldLabel: 'Field 1',
        anchor: '100%'
      }
    },{
      xtype: 'container',
      columnWidth: 0.5,
      layout: 'form',
      items: {
        xtype: 'textfield',
        fieldLabel: 'Field 2',
        anchor: '100%'
      }
    }]

  8. #8

    Default

    thank you. that solved the issue.

Similar Threads

  1. [3.0.0] Double label in combobox give the first label
    By Frontier in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 23 Jul 2009, 3:58 AM
  2. Hiding the combobox and the label sometime?
    By leandrorc in forum Ext 2.x: Help & Discussion
    Replies: 23
    Last Post: 17 Apr 2009, 6:38 AM
  3. Get combobox label + others
    By neves in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 7 Apr 2008, 8:45 AM
  4. combobox label
    By topcoder1 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 20 Aug 2007, 12:36 PM

Posting Permissions

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