LISTVIEW Control Styles

Styles

%LVS_ALIGNLEFT

Items are left-aligned in icon and small icon view.

%LVS_ALIGNTOP

Items are aligned with the top of the control in icon and small icon view.

%LVS_AUTOARRANGE

Icons are automatically kept arranged.

%LVS_EDITLABELS

Item text can be edited by the user.  The parent window must process notification messages.

%LVS_ICON

This style specifies icon view.

%LVS_LIST

This style specifies list view.

%LVS_NOCOLUMNHEADER

In report view, there are no headers on the columns.

%LVS_NOLABELWRAP

Item text is displayed on a single line in icon view.

%LVS_NOSCROLL

No scroll bars are provided.  Incompatible with list view and report view.

%LVS_NOSORTHEADER

Report view column headers are flat, not like buttons.  User can not click on the header to generate a column click notification.

%LVS_OWNERDATA

Creates a virtual listview control.

%LVS_OWNERDRAWFIXED

The owner window can paint items in report view.

%LVS_REPORT

This style specifies report view. The first column is always left-aligned and columns have headers.

%LVS_SHAREIMAGELISTS

The image list will not be deleted when the control is destroyed.

%LVS_SHOWSELALWAYS

Selections are always shown, even without the focus.

%LVS_SINGLESEL

Only one item at a time can be selected.  By default, multiple items may be selected.

%LVS_SMALLICON

This style specifies small icon view.

%LVS_SORTASCENDING

Item indexes are sorted as added in ascending order.

%LVS_SORTDESCENDING

Item indexes are sorted as added in descending order.

%WS_DISABLED

Create a control that is initially disabled. A disabled control cannot receive input from the user.

%WS_GROUP

Define the start of a group of controls. The first control in each group should also use %WS_TABSTOP style. The next %WS_GROUP control in the tab order defines the end of this group and the start of a new group. Groups configured this way permit the arrow keys to shift focus between the controls within the group, and focus can jump from group to groups with the usual TAB and SHIFT+TAB keys. Both tab stops and groups are permitted to wrap from the end of the tab order back to the start.

%WS_TABSTOP

Allow the list box control to receive keyboard focus when the user presses the TAB and SHIFT+TAB keys. The TAB key shifts keyboard focus to the next control with the %WS_TABSTOP style, and SHIFT+TAB shifts focus to the previous control with %WS_TABSTOP. (default)

%WS_BORDER

Add a thin line border around the control.

 

Extended Styles

%WS_EX_CLIENTEDGE

Apply a sunken edge border to the control.

%WS_EX_LEFT

The control has generic "left-aligned" properties. (default)

%WS_EX_RIGHT

The control has generic "right-aligned" properties. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment.

%WS_EX_TRANSPARENT

Controls/windows beneath the dialog are drawn before the dialog is drawn. The dialog is deemed transparent because elements behind the dialog have already been painted - the dialog itself is not drawn differently. True transparency is achieved by using Regions - see MSDN and/or the Platform SDK documentation for more information.

%WS_EX_WINDOWEDGE

Apply a raised edge border to the control.

 

See Also

Styles reference

CONTROL ADD LISTVIEW

LISTVIEW statement