PDA

View Full Version : xtype:checkbox not working



waken
7 Apr 2010, 5:40 AM
I cant use Extjs checkbox control :( still have old-style good looking checkbox - other controls are rendered properly.


var panel = {
xtype: 'container',
layout: 'form',
border:false,
defaults : {bodyStyle:'padding:0px;', style:{"margin": "0px"}},
items : [{
xtype:'datefield',
fieldLabel: 'Data do',
name: 'data_do',
anchor:'55%',
allowBlank: false
},{
xtype: 'checkbox'
,id:'cbPal'
,name : 'nCbPal'
,fieldLabel: 'Test'
,name: 'paliwa'
,trueText: 'T'
,falseText: 'N'
}]
};




var panelAll = new Ext.FormPanel({
labelAlign: 'left',
title: 'Dane',
bodyStyle: 'padding:4px; ',
layout: 'table',
baseCls: 'x-plain',
autoScroll: true,
// width: 600,
layoutConfig: { columns: 2 },
defaults: {frame:true, width:400, height: 200, bodyStyle:'padding:2px;', style:{"margin": "4px"} },
items: [{
title :'Tests',
border:false,
height:250,
rowspan:2,
autoScroll: false,
items: [
panel
]
}]
});

jay@moduscreate.com
7 Apr 2010, 5:43 AM
you must be doing something wrong.

it works for me.


var panel = {
xtype: 'container',
layout: 'form',
border:false,
defaults : {bodyStyle:'padding:0px;', style:{"margin": "0px"}},
items : [{
xtype:'datefield',
fieldLabel: 'Data do',
name: 'data_do',
anchor:'55%',
allowBlank: false
},{
xtype: 'checkbox'
,id:'cbPal'
,name : 'nCbPal'
,fieldLabel: 'Test'
,name: 'paliwa'
,trueText: 'T'
,falseText: 'N'
}]
};




var panelAll = new Ext.FormPanel({
labelAlign: 'left',
title: 'Dane',
bodyStyle: 'padding:4px; ',
layout: 'table',
baseCls: 'x-plain',
autoScroll: true,
// width: 600,
layoutConfig: { columns: 2 },
defaults: {frame:true, width:400, height: 200, bodyStyle:'padding:2px;', style:{"margin": "4px"} },
items: [{
title :'Tests',
border:false,
height:250,
rowspan:2,
autoScroll: false,
items: [
panel
]
}]
});

new Ext.Window({
items : panelAll,
layout : 'fit',
width : 400,
height : 400
}).show();

paste this anywhere

Dumbledore
7 Apr 2010, 10:22 PM
same here...

The same behaviour i have at the example page:

http://www.extjs.com/deploy/dev/examples/form/check-radio.html

on every browser...

This must be a bug...

Korbin
10 Jun 2010, 3:23 PM
ExtJS 3.x does not support themed checkboxes/radios. See this thread (http://www.extjs.com/forum/showthread.php?64689-Themed-checkboxes-radios-for-Ext-3.0) for a solution.