|
TSRVCustomListBox is the base class for list box controls.
Unit SRVListBox;
Syntax
TSRVCustomListBox = class(TSRVWinControl);
Hierarchy
TObject
TPersistent
TComponent
TControl
TWinControl
TSRVWinControl
Properties and events
Public properties
Property
|
Type
|
Default value
|
Meaning
|
DoubleBuffered
|
Boolean
|
False
|
Determines whether the control’s image is rendered directly to the window or painted to an in-memory bitmap first. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive.
|
HideSelection
|
Boolean
|
True
|
Determines whether the visual indication of the selected item remains when focus shifts to another control.
|
HotItemBackColor
|
|
clBackground
|
Background color for the highlighted item (below the mouse pointer).
|
HotItemBorderColor
|
|
clSilver
|
Border color for the highlighted item.
|
HotItemTextColor
|
|
clWhite
|
Text color for the highlighted item.
|
ImageList
|
TCustomImageList
|
|
Specifies the images that appear next to items in the list box.
|
ItemHeight
|
Integer
|
|
Specifies the height in pixels of an item in an owner-draw list box.
|
ItemIndex
|
Integer
|
|
Specifies the ordinal number of the selected item in the list box’s item list. If the value of the MultiSelect property is True the user can select more than one item in the list box. In this case, the ItemIndex value is the index of the selected item that has focus
|
Items
|
TSRVLBoxItemCollection
|
|
Items, a collection of TSRVLBoxItem.
|
MultiSelect
|
Boolean
|
False
|
Determines whether the user can select more than one element at a time.
|
ScrollBar
|
TSRVScrollBar
|
|
Read-only. Returns a scroll bar object.
|
SelectedItemBackColor
|
|
clHighlight
|
Background color for the selected item.
|
SelectedItemBorderColor
|
|
clSilver
|
Border color for the selected item.
|
SelectedItemTextColor
|
|
clHighlightText
|
Text color for the selected item.
|
ShowCheckBoxes
|
Boolean
|
False
|
Shows/hides check boxes in each item.
|
Sorted
|
Boolean
|
False
|
Specifies whether the items in a list box are arranged alphabetically.
|
UseItemFontNames
|
Boolean
|
False
|
Specifies whether the FontName properties of items are used to display their Captions.
|
Public events
OnMeasureItem occurs when the application needs to redisplay an item in a variable height owner-draw list box.
OnDrawItem occurs when an item in an owner-draw list box needs to be redisplayed.
See also properties and events inherited from TSRVWinControl.
Methods
BeginUpdate/EndUpdate locks/unlocks redrawing.
IndexOf returns the index of item by its Caption.
HasParent returns True if the given item has a parent item.
GetParent returns the index of the parent item for the given item.
AppendItem adds an item with the specified properties to the end of the item list.
InsertItem inserts an item with the specified properties at the position Index.
DeleteItem deletes the specified item.
Inherited components
TSRVListBox
|