Closed ChloeDigitalTechnologies closed 7 years ago
Instead of :
procedure TForm3.ReLoadLV; var J, realIndex, ColumnInRow, RowCount: Integer; AItem: TListViewItem; iBitmap: TListItemImage; begin ListView1.OnPaint := nil; [...................... Code ..............................] ListView1.OnPaint := ListView1Paint; end;
Enclose the code with BeginUpdate/EndUpdate, and finish with Repaint, like this :
procedure TForm3.ReLoadLV; var J, realIndex, ColumnInRow, RowCount: Integer; AItem: TListViewItem; iBitmap: TListItemImage; begin ListView1.BeginUpdate; [...................... Code ..............................] ListView1.OnPaint := ListView1Paint; ListView1.EndUpdate; ListView1.Repaint; end;
thanks, fixed
I was wondering : I am not sure if the Repaint method is calles by EndUpdate or not (I think it is not, that's why I recommend to use it at the end)
Instead of :
Enclose the code with BeginUpdate/EndUpdate, and finish with Repaint, like this :