|
|
|
| acConnection and acProcess objects.
|
| property Data: Pointer;
|
| The Data property specifies any application-specific data associated with the TacConnection object.
|
|
|
| Use Data to associate arbitrary data structure with the TacConnection object.
|
| // Demonstrates how to fill the ListView with process entries
|
| // and associate ListItem with TacProcess object and otherwise, TacProcess with ListItem...
|
| procedure TForm1.Button1Click(Sender: TObject);
|
| var
|
| I: Integer;
|
| ListItem: TListItem;
|
| begin
|
| ListView1.Items.BeginUpdate;
|
| try
|
| ListView1.Items.Clear;
|
| I := acConnectionList1.Count;
|
| if I <> 0 then
|
| for I := 0 to I - 1 do
|
| begin
|
| ListItem := ListView1.Items.Add;
|
| ListItem.Caption := acConnectionList1[I].LocalHostname;
|
|
|
| // associate the Data pointer to TacConnection object and Data pointer of Connection object to ListItem
|
| ListItem.Data := acConnectionList1[I];
|
| acConnectionList1[I].Data := ListItem;
|
| end;
|
| finally
|
| ListView1.Items.EndUpdate;
|
| end;
|
| end;
|