procedure TForm1.Button1Click(Sender: TObject);
var
i,j:Integer;
begin
self.ListBox1.Items.Clear;
i:=self.RzCheckTree1.Items.Count;
for j:=0 to i-1 do
begin
if self.RzCheckTree1.Items[j].StateIndex=2 then//stateindex=2表示当前节点的checked:=true;
self.ListBox1.Items.Add(self.RzCheckTree1.Items[j].Text);
end;
end;
转载于:https://www.cnblogs.com/martian6125/archive/2012/10/08/9631116.html
本文介绍了一个使用Delphi编程语言实现的功能:通过检查树控件(RzCheckTree)中被选中的项来填充列表框(ListBox)。具体操作为遍历树形控件的所有项,并将状态为已选中的项的文本添加到列表框中。

被折叠的 条评论
为什么被折叠?



