extended listview styles
Previous Topic  Next Topic 


lvs_ex_checkboxes

Version 4.70. Enables check boxes for items in a list view control. Effectively, when set to this style, the control will create and set a state image list using DrawFrameControl. Check boxes are visible and functional with all list view modes. You can obtain the state of the check box for a given item with ListView_GetCheckState. To set the check state, use ListView_SetCheckState.

LVS_EX_FLATSB

Version 4.71. Enables flat scroll bars in the list view. If you need more control over the appearance of the list view's scroll bars, you should manipulate the list view's scroll bars directly using the Flat Scroll Bar APIs. If the system metrics change, you are responsible for adjusting the scrollbar metrics with FlatSB_SetScrollProp. See Flat Scroll Bars for further details.

lvs_ex_fullrowselect

Version 4.70. When an item is selected, the item and all its subitems are highlighted. This style is available only in conjunction with the LVS_REPORT style.

lvs_ex_gridlines

Version 4.70. Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style.

LVS_EX_HEADERDRAGDROP

Version 4.70. Enables drag-and-drop reordering of columns in a list view control. This style is only available to list view controls that use the LVS_REPORT style.

LVS_EX_INFOTIP

Version 4.71. When a list view control uses the LVS_EX_INFOTIP style, the LVN_GETINFOTIP notification message is sent to the parent window before displaying an item's tooltip.

LVS_EX_LABELTIP

Version 5.80. If a partially hidden label in any list view mode lacks tooltip text, the list view control will unfold the label. If this style is not set, the list view control will unfold partly hidden labels only for the large icon mode.

LVS_EX_MULTIWORKAREAS

Version 4.71. If the list view control has the LVS_AUTOARRANGE style, the control will not autoarrange its icons until one or more work areas are defined (see LVM_SETWORKAREAS). To be effective, this style must be set before any work areas are defined and any items have been added to the control.

LVS_EX_ONECLICKACTIVATE

Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user clicks an item. This style also enables hot tracking in the list view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Remarks for a discussion of item activation.

LVS_EX_REGIONAL

Version 4.71. The list view will create a region that includes only the item icons and text and set its window region to that using SetWindowRgn. This will exclude any area that is not part of an item from the window region. This style is only available to list view controls that use the LVS_ICON style.

LVS_EX_SUBITEMIMAGES

Version 4.70. Allows images to be displayed for subitems. This style is available only in conjunction with the LVS_REPORT style.

LVS_EX_TRACKSELECT

Version 4.70. Enables hot-track selection in a list view control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time. The delay can be changed from the default system setting with a LVM_SETHOVERTIME message. This style applies to all styles of list view control. You can check whether or not hot-track selection is enabled by calling SystemParametersInfo.

LVS_EX_TWOCLICKACTIVATE

Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user double-clicks an item. This style also enables hot tracking in the list view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Remarks for a discussion of item activation.

LVS_EX_UNDERLINECOLD

Version 4.71. Causes non-hot items that are activatable to be displayed with underlined text. This style requires that LVS_EX_TWOCLICKACTIVATE also be set. See the Remarks for a discussion of item activation.

LVS_EX_UNDERLINEHOT

Version 4.71. Causes hot items that are activatable to be displayed with underlined text. This style requires that LVS_EX_ONECLICKACTIVATE or LVS_EX_TWOCLICKACTIVATE also be set. See the Remarks for a discussion of item activation.

Remarks

An item becomes hot when the mouse hovers over it. If hot-tracking is enabled, hot items will be highlighted, but the user must still click the item at least once to activate it. Activating an item causes the list view control to send an LVN_ITEMACTIVATE notification. An item is activatable when it is in a state where a single click will activate it.

If the LVS_EX_ONECLICKACTIVATE style is set, only one click is required to activate any item, so all items are activatable. If the LVS_EX_TWOCLICKACTIVATE style is set, two clicks are required to activate an item. With this style, the item becomes activatable only after it has been clicked once.

Setting the LVS_EX_UNDERLINEHOT style will cause the text of a hot activatable item to be underlined. Setting the LVS_EX_UNDERLINECOLD style will cause the text of items that are activatable but not hot to be underlined.