ListView Control Constants

Listview Control Constants

Constant Value Description
lvwIcon 0 (Default) Icon. Each ListItem object is represented by a full-sized (standard) icon and a text label.
lvwSmallIcon 1 SmallIcon. Each ListItem is represented by a small icon and a text label that appears to the right of the icon. The items appear horizontally.
LvwList 2 List. Each ListItem is represented by a small icon and a text label that appears to the right of the icon. Each ListItem appears vertically and on its own line with information arranged in columns.
lvwReport 3 Report. Each ListItem is displayed with its small icons and text labels. You can provide additional information about each ListItem. The icons, text labels, and information appear in columns with the leftmost column containing the small icon, followed by the text label. Additional columns display the text for each of the item's subitems.

ListArrange Constants

Constant Value Description
lvwNone 0 (Default) None.
lvwAutoLeft 1 Left. ListItem objects are aligned along the left side of the control.
lvwAutoTop 2 Top. ListItem objects are aligned along the top of the control.

ListColumnAlignment Constants

Constant Value Description
lvwColumnLeft 0 (Default) Left. Text is aligned left.
lvwColumnRight 1 Right. Text is aligned right.
lvwColumnCenter 2 Center. Text is centered.

ListLabelEdit Constants

Constant Value Description
lvwAutomatic 0 (Default) Automatic. The BeforeLabelEdit event is generated when the user clicks the label of a selected node.
lvwManual 1 Manual. The BeforeLabelEdit event will be generated only when the StartLabelEdit method is invoked.

ListSortOrder Constants

Constant Value Description
lvwAscending 0 (Default) Ascending order. Sorts from the beginning of the alphabet (A-Z), the earliest date, or the lowest number.
lvwDescending 1 Descending order. Sorts from the end of the alphabet (Z-A), the latest date, or the highest number.

ListFindItemWhere Constants

Constant Value Description
lvwText 0 (Default) Text. Matches the string with a ListItem object's Text property.
lvwSubItem 1 SubItem. Matches the string with any string in a ListItem object's SubItems property.
lvwTag 2 Tag. Matches the string with any ListItem object's Tag property.

ListFindItemHow Constants

Constant Value Description
lvwWholeWord 0 (Default) Whole word. Sets the search so that a match occurs if the item's Text property begins with the whole word being searched for. Ignored if the criteria is not text.
lvwPartial 1 Partial. Sets the search so that a match occurs if the item's Text property begins with the string being searched for. Ignored if the criteria is not text.

TextBackground Constants

Constant Value Description
lvwTransparent 0 The text background is transparent.
lvwOpaque 1 The text background is the same color as the BackColor property.