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;
原文地址:https://www.cnblogs.com/jieke/p/2830504.html