I'm testing with TStringGrid and TValueListEditor. I have a few things.
1. with TValueListEditor, I can assign strings to it at design time. But I cannot remove them once there are a few lines. I can erase the content (texts), but cannot remove them altogether. So my program clears it during form creation.
procedure TForm1.FormCreate(Sender: TObject);
begin
ValueListEditor1.Clear;
end;
2. My form has three components on it --- TListview, TStringGrid and TValueListEditor. I'd like to implement a form that can edit objects linked to each row of them (in the way of TStrings.AddObject). When any row is selected, the object linked to it should be editable. But before loading new object, previous object must be saved (if anything is opened). So I must be able to detect focus-losing row and getting-focused row. Attached sample project is to test this.
1) Memo1.Lines.add... itself works fine. But when I change these to "ShowMessage", the selection process itself is very strange. In TStringGrid, multiple lines are selected, and just hovering over TValueListEditor calls selection.
2) with TListView, the methods are called in order. First calling deselected row and then selected row.
3) with TStringList, meanings of BeforeSelection and AfterSelection seem exchanged. When selection moves from row1 to row3, events are called in the order of Row 3 before selection --> Row 1 after selection. They should be called Row 1 Before Selection --> Row 3 After Selection to keep consistency with TListView or TTreeView.
4) With TValueListEditor,
a. When there are only one item, clicking the value column does not call any event.
b. But when key colums is clicked, events are called.
c. both BeforeSelection and OnSelection gives the same row. I cannot do anything on focus-losing item.