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.
  • 相关阅读:
    推荐:VisualStudio 2005/2008的“Consolas”字体包
    [转]Calendar 動態產生子控制項的 Event Handler, 模拟__doPostBack() 回发
    Ajax ToolKit ModelPopupExtender应用经验二则
    [转]Calendar 控件日期复选
    ASP.NET偷懒大法六(可空类型的动态赋值)
    弹出层(Div)屏蔽父窗口并且让父窗口变暗
    CSS巧用expression来区分只读文本框
    formValidator用户注册表单自动验证
    基于Session原理的验证码方案
    jQuery解决IE6下PNG图片背景透明问题
  • 原文地址:https://www.cnblogs.com/umlchina/p/305508.html
Copyright © 2011-2022 走看看