[示例] 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