Results 1 to 2 of 2

Thread: input listeners in Ext.panel.Panel

  1. #1
    Sencha User
    Join Date
    Dec 2013
    Posts
    65
    Answers
    2

    Default input listeners in Ext.panel.Panel

    hello i am want input function for click button in keyboard on Ext.panel.Panel, i do this for: extend: 'Ext.window.Window':

    PHP Code:
    Ext.define('Container'
    {
    extend'Ext.window.Window',
    alias 'widget.container',
    title 'book'
    listeners: {    
    afterrender: function (thisFormoptions
    {        
    this.keyMap Ext.create(           
     
    'Ext.util.KeyMap',            
    this.el,           
     [               
     {                   
     
    key13,                    
    fn: function () {                        
    Ext.Msg.alert('title''you click enter');                   
     },                    
    scopethis               
     
    }           
     ]       
     );    
    } }, 
    but when i do this on Ext.panel.Panel it not work (nothing output in the console.):

    PHP Code:
    Ext.define('doc', {
    extend'Ext.panel.Panel',
    alias'widget.doc',     
    listeners: {    
    afterrender: function (thisFormoptions) {       
     
    this.keyMap Ext.create(            
    'Ext.util.KeyMap',          
      
    this.el,          
      [               
     {                   
     
    key13,                   
     
    fn: function () {                       
     
    Ext.Msg.alert('title''enter click');                  
      },                   
     
    scopethis               
     
    }           
     ]       
     );   
     } }, 
    how to solve this problem?

  2. #2
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    You'll need to manually make the panel body focusable. This can be done by assigning a tabindex value to the body's dom.

    Regards,
    Brian


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •