Share via


List-Box Styles

  • LBS_EXTENDEDSEL   The user can select multiple items using the SHIFT key and the mouse or special key combinations.

  • LBS_HASSTRINGS   Specifies an owner-draw list box that contains items consisting of strings. The list box maintains the memory and pointers for the strings so the application can use the GetText member function to retrieve the text for a particular item.

  • LBS_MULTICOLUMN   Specifies a multicolumn list box that is scrolled horizontally. The SetColumnWidth member function sets the width of the columns.

  • LBS_MULTIPLESEL   String selection is toggled each time the user clicks or double-clicks the string. Any number of strings can be selected.

  • LBS_NOINTEGRALHEIGHT   The size of the list box is exactly the size specified by the application when it created the list box. Usually, Windows sizes a list box so that the list box does not display partial items.

  • LBS_NOREDRAW   List-box display is not updated when changes are made. This style can be changed at any time by sending a WM_SETREDRAW message.

  • LBS_NOTIFY   Parent window receives an input message whenever the user clicks or double-clicks a string.

  • LBS_OWNERDRAWFIXED   The owner of the list box is responsible for drawing its contents; the items in the list box are the same height.

  • LBS_OWNERDRAWVARIABLE   The owner of the list box is responsible for drawing its contents; the items in the list box are variable in height.

  • LBS_SORT   Strings in the list box are sorted alphabetically.

  • LBS_STANDARD   Strings in the list box are sorted alphabetically, and the parent window receives an input message whenever the user clicks or double-clicks a string. The list box contains borders on all sides.

  • LBS_USETABSTOPS   Allows a list box to recognize and expand tab characters when drawing its strings. The default tab positions are 32 dialog units. (A dialog unit is a horizontal or vertical distance. One horizontal dialog unit is equal to one-fourth of the current dialog base width unit. The dialog base units are computed based on the height and width of the current system font. The GetDialogBaseUnits Windows function returns the current dialog base units in pixels.)

  • LBS_WANTKEYBOARDINPUT   The owner of the list box receives WM_VKEYTOITEM or WM_CHARTOITEM messages whenever the user presses a key while the list box has input focus. This allows an application to perform special processing on the keyboard input.

  • LBS_DISABLENOSCROLL   The list box shows a disabled vertical scroll bar when the list box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items.

See Also   CListBox::Create