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());
                    }
             }
  • 相关阅读:
    HDU 1856 More is better
    并查集模板
    HDU 1325 Is It A Tree?
    HDU 1272 小希的迷宫
    CodeVS 2639 约会计划
    POJ 1163 数字三角形
    HDU 1232 畅通工程
    HDU 1213 How Many Tables
    树形结构打印二叉树
    网址收藏
  • 原文地址:https://www.cnblogs.com/timy/p/1795763.html
Copyright © 2011-2022 走看看