UPDATE : My question is about FMX listView not about VCL one , that's to explaine that my Question isn't a duplicate of this question .
i'm trying to accomplish a kind of ListView Items hide mechanism by setting ListView.Item[x].Height:=0 , But that didn't give any result
Adding Items :
procedure TForm6.AddItemsClick(Sender: TObject);
var
I:Integer;
AItem: TListViewItem;
begin
for I := 0 to 5 do
Begin
AItem := ListView1.Items.Add;
//with AItem do
// Text := 'Text';
End;
end;
Trying to hide Items :
procedure TForm6.HideItemsClick(Sender: TObject);
var
I:Integer;
begin
ListView1.BeginUpdate;
try
for I := 0 to ListView1.ItemCount-1 do
// ListView1.Items.Item[I].Height:=0; // doesn't give any result
ListView1.Items.Item[I].Height:=1;
finally
ListView1.EndUpdate;
end;
end;
Any help to fix this please ? or why
ListView1.Items.Item[I].Height:=0;
Has no effect ?