比如在treenode中  加入一个与  text 类似的属性

解决方案 »

  1.   

    同意qxj(小小小小小小程序员) 
    具体的
    再自己加一个属性
    ...
    private
     YourText:string;
     function ReadYourText:string;
     procedure SetYourText(s:string);
    published
     property YourText:string read ReadYourText write SetYourText;
    ...
    end;
    在实现部分(略写)SetYourText中 YourText:=s;  ReadYourText中 result:=YourText;
      

  2.   

    参考一下:Delphi的VCL中,如何实现TCheckListBox的。当然,您的问题没有此类中实现的复杂,但是参考一下,您会受益匪浅。