GetItemText

GetItemText( _
    ByVal tag As Object) As String

Event fired to get the text associated with an item.

Return the text to display in the first column in Detail view, or as the item label in other views. The other columns of the Detail view are controlled by GetSubItems. Cast the tag parameter to your own data type.


Private Function personListView_GetItemText(ByVal tag As Object) As String
   ' We know that the tag is a person,
   ' since it was returned from GetItems.
Dim person As Person = DirectCast(tag, Person)
   ' Display last name, first name in the first column
   Return person.LastFirst
End Function

If you do not implement this event, the object's ToString method is used by default. SetItemText


Parameters:

ByVal tag As Object

Returns:

String