Ghosted Property

Purpose

Returns or sets a Boolean that determines whether a ListItem object in a ListView control is unavailable (it appears dimmed).

Syntax

ListItem.Ghosted [= Boolean ]

Description

The Ghosted property is typically used to show when a ListItem is cut, or disabled for some reason.

When a ghosted ListItem is selected, the label is highlighted but its image is not.

Example

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

Debug.Show

For Each li In lv1

Debug li.Text,li.Ghosted

Next

Do : Sleep : Until Me Is Nothing

See Also

ListItem, ListView

{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}