ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/ibtreeview/Unit1.pas
(Generate patch)

Comparing ibx/trunk/examples/ibtreeview/Unit1.pas (file contents):
Revision 21 by tony, Thu Feb 26 10:33:34 2015 UTC vs.
Revision 27 by tony, Tue Apr 14 13:10:23 2015 UTC

# Line 83 | Line 83 | type
83      procedure DepartmentsAfterDelete(DataSet: TDataSet);
84      procedure DepartmentsAfterInsert(DataSet: TDataSet);
85      procedure DepartmentsAfterTransactionEnd(Sender: TObject);
86    procedure DepartmentsBeforeScroll(DataSet: TDataSet);
86      procedure DepartmentsBUDGETChange(Sender: TField);
87      procedure DepartmentsBUDGETGetText(Sender: TField; var aText: string;
88        DisplayText: Boolean);
# Line 131 | Line 130 | end;
130   procedure TForm1.AddChildExecute(Sender: TObject);
131   begin
132    IBTreeView1.Selected.Expand(true);
133 <  IBTreeView1.Items.AddChild(IBTreeView1.Selected,'');
133 >  IBTreeView1.Selected := IBTreeView1.Items.AddChild(IBTreeView1.Selected,'');
134    IBTreeView1.Selected.Expand(true);
135 +  IBTreeView1.Selected.EditText;
136   end;
137  
138   procedure TForm1.AddFirstChildExecute(Sender: TObject);
139   begin
140    IBTreeView1.Selected.Expand(true);
141 <  IBTreeView1.Items.AddChildFirst(IBTreeView1.Selected,'');
141 >  IBTreeView1.Selected := IBTreeView1.Items.AddChildFirst(IBTreeView1.Selected,'');
142    IBTreeView1.Selected.Expand(true);
143 +  IBTreeView1.Selected.EditText;
144   end;
145  
146   procedure TForm1.AddSiblingExecute(Sender: TObject);
147   begin
148 <  IBTreeView1.Items.Add(IBTreeView1.Selected,'');
148 >  IBTreeView1.Selected := IBTreeView1.Items.Add(IBTreeView1.Selected,'');
149 >  IBTreeView1.Selected.EditText;
150   end;
151  
152   procedure TForm1.CancelBtnClick(Sender: TObject);
# Line 181 | Line 183 | begin
183      Application.QueueAsyncCall(@Reopen,0);
184   end;
185  
184 procedure TForm1.DepartmentsBeforeScroll(DataSet: TDataSet);
185 begin
186  with DataSet do
187    try
188      if State in [dsInsert,dsEdit] then Post
189    except on E: Exception do
190      begin
191        Cancel;
192        MessageDlg(E.Message,mtError,[mbOK],0)
193      end
194    end;
195 end;
196
186   procedure TForm1.DepartmentsBUDGETChange(Sender: TField);
187   begin
188    SetNodeImage(IBTreeView1.Selected)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines