PDA

View Full Version : How to capture arrow key events of TreePanel?



dbassett74
21 Jul 2009, 2:39 PM
It DELETE and RETURN work, but not the UP and DOWN keys. How can I capture these?



FolderView = Ext.extend(Ext.tree.TreePanel, {
constructor: function(config) {
var selectBuffer = 0;
Ext.apply(this, {
...
keys: [
{ key: 13, fn: function() { Ext.Msg.alert('folderView', 'RETURN') } }
, { key: 46, fn: function() { Ext.Msg.alert('folderView', 'DELETE') } }
, { key: 38, fn: function() { Ext.Msg.alert('folderView', 'UP') } }
, { key: 40, fn: function() { Ext.Msg.alert('folderView', 'DOWN') } }
]
}); //eo Ext.apply
FolderView.superclass.constructor.apply(this, arguments);
}
});