• how to design a new tree view control


       
    We recently need a special tree view control that included some Checkbox or Radio controls in some tree node in a VSTO project. Some of complex nodes included checkbox controls or radio controls but others nodes maybe only is a simply tree node in same TreeView control. If we set value of the property named Checkboxes is “true”, all of the node are included a Checkbox in the TreeView controls, otherwise it will have not any checkbox controls.
    So I have to redesign a control to implements these features. I decided to inherit directly from the TreeView class instead of create a new class. I overwrite the method named (OnPaint, WndProc, OnResize etc) and add some new method that will draw a CheckBox control or Radio control in a tree node.
    public partial class BaseTreeView : TreeView
        
    {
            
    private define

            
            
    public BaseTreeView()
            
    {
                InitializeComponent();
            }


            
    private method

            
    public method
        }

      If any question please reply me.
  • 相关阅读:
    hadoop——数据清洗测试
    本地配置hadoop
    从textarea中获取数据后按原样显示
    form自动提交
    艺术和代码的结合 turtle + python 的结合
    python-->微信支付
    python-图片流传输(url转换二维码)
    python-qrcode-二维码
    Java 通过先序中序序列生成二叉树
    Java 实现二叉树的构建以及3种遍历方法
  • 原文地址:https://www.cnblogs.com/umlchina/p/305508.html
Copyright © 2020-2023  润新知