zoukankan      html  css  js  c++  java
  • TreeList右键功能及常见设置

    1、TreeList设置内容不可编辑,在OptionBehavior中的Editable属性设置为false即可.GridControl同样
    2、TreeList获取节点的内容,node.GetDisplayText(object ColumnID),参数为获取列的编号;
    3、TreeList鼠标右键绑定事件:
     private void MenuList_MouseDown(object sender, MouseEventArgs e)
            {
                if (e.Button == MouseButtons.Right)
                {
                    MenuList.ContextMenu = null;
                    TreeListHitInfo hInfo = MenuList.CalcHitInfo(new Point(e.X, e.Y));
                    TreeListNode node = hInfo.Node;
                    if (node != null)
                    {
                        MenuList.FocusedNode = node;
                        MenuList.ContextMenuStrip = contextMenu;
                    }
                }
            }


  • 相关阅读:
    api示例
    Windows+Ubuntu文件互传
    UI
    事件
    插件开发入门
    文摘
    刘海屏适配
    APT
    热修复
    进程保活
  • 原文地址:https://www.cnblogs.com/dengshiwei/p/4258762.html
Copyright © 2011-2022 走看看