Hi.
My ListView object has 1 column
When I click Button1 first, Test is showed in ListView with Red Color.
When I click Button1 second and other times, texts not showed in ListView and scroll bar is blinking
Note: When I run this code on Windows 7, everything is ok.
procedure TForm1.Button1Click(Sender: TObject);
var
li : TListItem;
begin
li := ListView1.Items.Add;
li.Caption := 'Test';
end;
procedure TForm1.ListView1AdvancedCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
var DefaultDraw: Boolean);
begin
if(Item.Index = 0) then Sender.Font.Color := clRed;
if(Item.Index = 1) then Sender.Font.Color := clBlue;
if(Item.Index = 2) then Sender.Font.Color := clYellow;
end;
My System is: Kubuntu 14.04, Lazarus 1.2.2, FPC: 2.6.4