PDA

View Full Version : Can I use ref to set default button?



deployit
14 Sep 2009, 6:19 AM
var window = new Ext.Window({
title : 'Title',
defaultButton: // I want set it using ref
width : 360,
items: [{
xtype: 'form',
ref: 'form1',
frame: true,
buttonAlign: 'right',
items:[
{
xtype: 'textfield',
fieldLabel : 'E-mail',
width: 200,
ref: 'email', // I want use it to config defaultButton
vtype: 'email',
} ],
buttons:[

{
text: 'OK',
},{
text: 'Cancel',
}
]
}
]
});

Can you help me how to set config defaultButton using ref

Animal
14 Sep 2009, 6:33 AM
ref: '../defaultButton'