Hi Lazarus/LCL/FPC experts,
just for fun I have tried to make a TListView Icon spin. On my test form I have a lone TListView (ViewStyle := vsReport, RowSelect := true), and I added a bunch of images to my SmallImages list, the images [0..5] contain the pictures of my rotating symbol. To check things out I let the symbol spin using a timer:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if ListView1.Selected<>NIL then
ListView1.Selected.ImageIndex:=(ListView1.Selected.ImageIndex + 1) mod 5;
end;
The timer is set to 200ms, the principle works well, the icon of the selected row does indeed spin. But it seems like the LCL Listview redraws the whole row, not only the icon, causing the whole selected row flicker annoyingly.
Does anyone know a way to reduce the flicker, or at least modify the repaint behaviour in such a way that only the icon flickers, but not the entire row??
Thx, Armin.
(Lazarus 1.6.4 on Windows 7/Windows 10)