zoukankan      html  css  js  c++  java
  • RzCheckTree,rzcheckGroup 的使用方式

    添加树的结点
    procedure AddNode;
    var
      Pnode,bnode:TTreeNode;
    begin
       RzCheckTree1.Items.Clear;
       Pnode:=RzCheckTree1.Items.Add(nil,'第1个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第11个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第12个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第13个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第14个');
    
       Pnode:=RzCheckTree1.Items.Insert(nil,'第2个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第21个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第22个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第23个');
       bnode:=RzCheckTree1.Items.AddChild(Pnode,'第24个');
    
       RzCheckTree1.FullExpand;  //展开
    //  RzCheckTree1.FullCollapse;  //收缩
    end;
    procedure SetRzChkGroup(aChkGropu:TRzCheckGroup;astr:string);
    procedure SetRzChkGroup(aChkGropu:TRzCheckGroup;astr:string);
    var
      i:Integer;
    begin
       for i:=0 to aChkGropu.Items.Count-1 do
       begin
           aChkGropu.ItemChecked[i]:=Copy(astr,i+1,1)='1';
       end;
    end;
    function GetRzChkGroup(aChkGropu:TRzCheckGroup):string;
     1 function  GetRzChkGroup(aChkGropu:TRzCheckGroup):string;
     2 var
     3   i:Integer;
     4 begin
     5    Result:='';
     6    for i:=0 to aChkGropu.Items.Count-1 do
     7    begin
     8       if aChkGropu.ItemChecked[i] then
     9         Result:=Result+'1'
    10       else
    11         Result:=Result+'0';
    12    end;
    13 end;
  • 相关阅读:
    Study Plan The Twelfth Day
    Study Plan The Fifteenth Day
    Study Plan The Seventeenth Day
    Study Plan The Tenth Day
    Study Plan The Eighth Day
    Study Plan The Eleventh Day
    Study Plan The Sixteenth Day
    Study Plan The Thirteenth Day
    Study Plan The Fourteenth Day
    Study Plan The Ninth Day
  • 原文地址:https://www.cnblogs.com/jieke/p/2830504.html
Copyright © 2011-2022 走看看