I fill programmatically DinamycAppearance TListview. There I have a TextButton, which sometimes I want to set Visible:=false.
li := ListView.Items.Add;
I tried these solutions, but neither works correctly:
li.Objects.ObjectByName('ButtonSelect').Visible := false;
li.View.FindDrawable('ButtonSelect').Visible := false;
I also tried to Destroy or Free this Object, but there I got errors.
Additionally sometimes it works, but just on the second buildup, but when I resize the Form, the ListView also forgets the visibility setup.
Do you have working solutions for this problem?
Thank you!
When using a Dynamic Listview item and you want to change the appearance of objects inside the items you need to do it under the
OnUpdateObjectsevent of the listview.Like so: