[示例] Firemonkey TreeView 父项勾选子项连动

效果:

 

代码:

procedure TForm1.TreeView1ChangeCheck(Sender: TObject);
var i: Integer;
    t: TTreeViewItem;
begin
     t := TTreeViewItem(Sender);

     for i:=0 to t.Count - 1 do
         t.Items[i].IsChecked := t.IsChecked;
end;

 

源码下载:[示例]TreeViewCheck_Aone.zip

 

posted @ 2017-05-17 11:14  龟山Aone  阅读(900)  评论(0编辑  收藏  举报