/ Forums / Advansys Formativ / Creating Solutions with Formativ / TRzListView / Reply To: TRzListView
January 11, 2005 at 3:27 pm
#7079
Peter,
Thank you for your enquiry.
If you want ListView subitems to be visible, be sure to set the property ViewStyle to vsReport. The following is a simple code example to populate a TRzListView…
Sub Main(Client, GWEvent) dim I dim iFruit, iFruits dim oItem ' Initialize a 2-dimensional array of data. iFruits = Array(Array("Apple", "July-Oct"), _ Array("Cherry", "May-June"), _ Array("Fig", "July-Sep"), _ Array("Kiwifruit", "Oct-May")) ' This assumes a form MainForm with TRzListView named ' ListView which has two columns defined. with MainForm.ListView .Column(0).Caption = "Fruit" .Column(1).Caption = "Months in season" .Items.BeginUpdate .Items.Clear for I = 0 to UBound(iFruits) iFruit = iFruits(I) set oItem = .Items.Add oItem.Caption = iFruit(0) oItem.SubItems.Add(iFruit(1)) next .Items.EndUpdate end with MainForm.ShowModal End Sub
I hope this helps you.
Advansys Support