javascript - ExtJs 4.1.1 Checkbox is rendering as button, need normal check box -
i using extjs 4.1.1 , want render normal checkbox rendered in div, following code rendered button. checked extjs source ext.form.field.checkbox , in found comment fieldsubtpl
property says
// creates not actual checkbox, button given aria role="checkbox" (if aria required) , // styled custom checkbox image. allows greater control , consistency in // styling, , using button allows gain focus , handle keyboard nav properly.
if case way normal checkbox?
ext.create('ext.container.container',{ id: 'mycontainer', width: 100, renderto: 'chekboxid', items: [{ xtype:'checkboxgroup', id:'chekcboxgrpid', items:[ { boxlabel: 'text check box', name : 'mycheckbox', inputvalue: 'true', checked: true } ] }] })
i think problem haven't include css/images project here example
css
<link rel="stylesheet" href="http://cdn.sencha.io/try/extjs/4.1.1/resources/css/ext-all-gray.css">
html
<div id="checkbox"></div>
javascript
ext.onready(function(){ var panel = ext.create('ext.panel.panel', { items: { xtype: 'fieldcontainer', fieldlabel: 'toppings', defaulttype: 'checkbox', items: [ { boxlabel : 'anchovies', name : 'topping', inputvalue: '1', id : 'checkbox1' } ] } }); panel.render('checkbox'); })
Comments
Post a Comment