zoukankan      html  css  js  c++  java
  • 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.
  • 相关阅读:
    对于石家庄铁道大学软件个人总结
    Android Studio安装
    典型用户模板和用户场景模板
    java+jsp+sql server实现网页版四则运算.
    四则运算一
    学习进度
    构建之法阅读笔记(一)
    记账本小程序7天开发记录(第一天)
    javabean+jsp+servlet+jdbc从软件安装到开发实例
    编写一个文件分割工具,能把一个大文件分割成多个小的文件。并且能再次把它们合并起来得到完整的文件。
  • 原文地址:https://www.cnblogs.com/umlchina/p/305508.html
Copyright © 2011-2022 走看看