0

I'm developing an application with Extjs-6. I define a checkbox as follow:

{
   xtype: 'checkboxfield',
   fieldLabel: 'This is a CHECKBOX, but it\'s  not display',
   style: {
      width: '95%',
      marginBottom: '10px',
      color: 'blue'
   },
}

My form with checkbox:
enter image description here
It display the fieldLabel, but don't show the checkbox. When I define change listeners, and then I press tab key, and then press spacekey, change listeners fires.

Where is the problem?
I set styles, But it change nothing. What am I doing wrong?

Tarabass
  • 3,132
  • 2
  • 17
  • 35
Morteza Malvandi
  • 1,656
  • 7
  • 30
  • 73
  • Could you provide a total example on the fiddle, it is definitely a problem of layout, but it is hard to say what is wrong only by checkbox config. – yorlin Oct 18 '15 at 14:08
  • On which device or browser are you testing? Also please post complete form panel code so that we can check and let you know because you have posted only checkbox field code and that is fine. – Mohit Saxena Oct 19 '15 at 07:51
  • Google Chrome Desktop. Windows 7. – Morteza Malvandi Oct 19 '15 at 07:53
  • add a [fiddle](http://fiddle.sencha.com). I guess the checkbox is hidden because lack of space in the form – aviram83 Oct 20 '15 at 10:32

1 Answers1

0

Try something like this:

{
     xtype: 'checkboxfield',
     fieldLabel: 'checkboxlabel',
     id:'checkboxid',
     minWidth: 50,
     padding: 0,
     allowBlank: true,
     labelSeparator: '',
     listeners: {
        labelEl: {
            click: function(e) {
                e.preventDefault();
            }
        }
     }
}
Michel
  • 571
  • 1
  • 4
  • 19
Shashi
  • 339
  • 1
  • 4
  • 15