By "edit" do you mean "modify programmatically" or "allow the user to modify via typing into a cell"?
If the former case, simply get a pointer to the TListItem you want to change (either ListView.Selected or ListView.Items[RowNumber])
The latter case is not possible with TListView. You might consider using a TStringGrid instead.
Main Topics
Browse All Topics





by: Ivanov_GPosted on 2004-10-08 at 05:39:39ID: 12258036
procedure TForm1.FormCreate(Sender: TObject); .Items);
: TObject);
var
item : TListItem;
begin
// add one item
item := TListItem.Create(ListView1
item := ListView1.Items.Add;
item.Caption := 'Column 1';
item.SubItems.Add('Column 2');
item.SubItems.Add('Column 3');
end;
procedure TForm1.Button1Click(Sender
var
lc_item : TListItem;
begin
// modify it
lc_item := ListView1.Items[0];
lc_item.SubItems[0] := 'Change second column';
end;