View Full Version : Add an accesskey to a TextField
Hi,
how can I define the accesskey for a TextField?
I couldn't find it in the API.
Thanks eztam!
Condor
4 Nov 2010, 5:11 AM
Wow! 4 years of working with Ext and you're the first one asking for accesskeys!
autoCreate: Ext.apply({accesskey: 'X'}, Ext.form.TextField.prototype.defaultAutoCreate)
I could solve it by adding an afterrender listener which sets the attribute "accesskey".
var myField = new Ext.form.TextField({...});
myField.on({
scope: myField,
afterrender: function() {
this.el.set({accesskey:'A'});
}
});
Thanks Condor, your solution looks better to me...
Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.