Determine the use of a gridlines in a ListView control.
% = ListView.Grid(integer)
ListView.GridLines [ = Bool ]
Grid - No longer seems to enable gridlines in report view mode; the integer must be present and must be a value between 0 and 3; the return value can be ignored.
GridLines = True displays gridlines around items and subitems. This style is available only in conjunction with the lvwReport style (View = 3).
Global a$, m As Int, n As Int
Dim li As ListItem
Ocx ListView lv1 = , 10, 10, 500, 150 : lv1.View = 3
For n = 1 To 5 : lv1.ColumnHeaders.Add , , "Column" & n : Next n
For n = 1 To 5 :
a$ = "" : For m = 1 To 5 : a$ = a$ & "Item " & ((n - 1) * 5) + m & Iif(m <> 5, ";", "") : Next m
lv1.Add , , "" : lv1(n).AllText = a$ : If n = 2 Then lv1(n).Ghosted = True
Next n
lv1.FullRowSelect = True
lv1.GridLines = True
Do : Sleep : Until Me Is Nothing
{Created by Sjouke Hamstra; Last updated: 27/03/2022 by James Gaite; Other Contributors: Jean-Marie Melanson}