The TListItem returned in OnSelectItem event of the TListView holds the previously selected item instead of the latest (current) one. Is It a bug? Tested in Linux Mint 17.2, Lazarus 1.4.4, FPC 2.6.4
Feed a TListView with some items first...
procedure TForm1.ListView1SelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
begin
Form1.Caption := Item.Caption;
end;
I had to use the
selectedparameter. The event gets called multiple times, with the old item and selected=False, and the actual item with Selected=ON.When coming from Delphi, it happens.