Hi all , question to the grop

Hi all , question to the grop
for using tlistview on FMX
code for windows is like
  var lt:Tlistitem;
  lt:=mylistview.Items.Add;
  lt.Text :='test';
  lt.SubItems.add('sub test');
    
but that does not compile ...error with the .text:= and .Subitems.add

although
mylistview.Items.Add;
mylistview.Items[mylistview.Items.Count-1].text :='test'
does work...but how then do you add a sub item?

thanks!
  

Comments

  1. The compile error on setting the Text property is because you typed the variable to TListItem instead of TListViewItem. The one on SubItems, in contrast, is because no such property exists, so far as I am aware...

    ReplyDelete
  2. I guess the thing is that FMX Tlistview is really aimed at mobile,i.e a spuced up tlistbox, hence the no subitems

    ReplyDelete

Post a Comment