Changeset 66 for branches/Transpascal/Forms/UProjectManager.pas
- Timestamp:
- Oct 18, 2010, 10:00:00 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Forms/UProjectManager.pas
r63 r66 15 15 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode); 16 16 private 17 { private declarations }17 procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 18 18 public 19 { public declarations }20 end; 19 procedure UpdateProjectTree; 20 end; 21 21 22 22 var … … 69 69 end; 70 70 71 procedure TProjectManager.UpdateProjectTree; 72 var 73 NewNode: TTreeNode; 74 begin 75 with MainForm, TreeViewProject, Items do begin 76 BeginUpdate; 77 Clear; 78 NewNode := AddChild(nil, Project.Name); 79 UpdateProjectGroup(NewNode, Project); 80 NewNode.Expand(True); 81 EndUpdate; 82 TreeViewProject.TopItem.Items[0].Selected := True; 83 end; 84 end; 85 86 procedure TProjectManager.UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 87 var 88 I: Integer; 89 NewNode: TTreeNode; 90 begin 91 with MainForm do 92 for I := 0 to Group.Items.Count - 1 do begin 93 NewNode := TreeViewProject.Items.AddChild(Node, 94 TProjectNode(Group.Items[I]).Name); 95 NewNode.Data := Pointer(Group.Items[I]); 96 if TProjectNode(Group.Items[I]) is TProjectGroup then 97 UpdateProjectGroup(NewNode, TProjectGroup(Group.Items[I])); 98 end; 99 end; 100 101 102 71 103 end. 72 104
Note:
See TracChangeset
for help on using the changeset viewer.