Search code examples
extjssencha-touchtextfieldfieldsethbox

Sencha - hbox layout has invisible lines in fieldset


{
                    layout: {
                        type: 'hbox'
                    },
                    items: [
                        {
                            xtype: 'selectfield',
                            placeHolder: 'selectfield',
                            autoSelect: false,
                        },
                        {
                            xtype: 'textfield',
                            placeHolder: 'textfield'
                        }
                    ]

                },

I want to use 'hbox' layoout with selectfield and textfield for horizontal components using Sencha Touch 2.0 but like this image, underlines for second component(textfield) in fieldset are not seen. What's wrong?

screenshot


Solution

  • Hi its nothing with hbox layout and fieldset. Its is due to selectField.these lines are the border of selectField. If you want to remove it you need something like this

    {
       xtype: 'selectfield',
       placeHolder: 'selectfield',
       autoSelect: false,
       border: 0,
    },  
    

    this will make it disappear these line i hope you get it ;)

    here is a simple fiddle

    And In case if you want to have borders follow this code

    {
      xtype: 'selectfield',
      border: 3,
      style: 'border-color: blue; border-style: solid;',
      flex: 1,
      placeHolder: 'selectfield',
      autoSelect: false,
    }, 
    {
      xtype: 'textfield',
      border: 3,
      style: 'border-color: blue; border-style: solid;',
      flex: 1,
      placeHolder: 'textfield'
    }