zoukankan      html  css  js  c++  java
  • extjs右键菜单

    extjs中的gridpanel、TreePanel等控件都可以有右键菜单,如下设置。

    代码
    listeners: {  
                    render: function() {  
                            
    // After the component has been rendered, disable the default browser context menu  
                            Ext.getBody().on("contextmenu", Ext.emptyFn, null, {preventDefault: true});  
                    },  
                    contextmenu: function(e) {  
    //在gridpanel中可以使用rowcontextmenu事件
                        
    // Init your context menu  

                        
    this.cmenu = new Ext.menu.Menu({
                            items: [ {
                                text: 
    'Close Other'
                            }, {
                                text: 
    'Close All'
                            }]
                        })
                        e.stopEvent();
                        
    this.cmenu.showAt(e.getPoint());
                    }
             }
  • 相关阅读:
    网页解析Jsoup简单使用
    ios开发中加载的image无法显示
    数据懒加载
    ijkplayer
    ijkplayer的一些优化
    Ambiguous expansion of macro weakify和Ambiguous expansion of macro strongify的警告
    xcode11新项目删除main.storyboard 两种方法
    iOS
    iOS
    iOS 12中获取WiFi的SSID
  • 原文地址:https://www.cnblogs.com/timy/p/1795763.html
Copyright © 2011-2022 走看看