<< Click to display table of contents >> TSRVCustomListBox |
TSRVCustomListBox is the base class for list box controls.
Unit SRVListBox;
Syntax
TSRVCustomListBox = class(TSRVWinControl);
TObject
TPersistent
TComponent
TControl
TWinControl
Public properties
Property |
Type |
Default value |
Meaning |
---|---|---|---|
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 |
|
Ignored. Item height is calculated automatically. |
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 |
|
Items, a collection of TSRVLBoxItem. |
|
ListMarginHeight |
TRVPixel96Length |
2 |
Top and bottom margins in each item. |
ListMarginWidth |
TRVPixel96Length |
3 |
Left and right margins of each item. |
MultiSelect |
Boolean |
False |
Determines whether the user can select more than one element at a time. |
ScrollBar |
|
Read-only. Returns a scroll bar object. |
|
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. |
UseSelectedImagesInHotState |
Boolean |
False |
Specifies whether Items[].SelectedImageIndex is used instead of Items[].ImageIndex for highlighted items (below the mouse pointer). |
Public properties working only if SRVControlStyle = srvcsClassic:
Property |
Type |
Default value |
Meaning |
---|---|---|---|
SelectedItemBackColor |
TColor |
clHighlight |
Background color for the selected item. |
SelectedItemBorderColor |
TColor |
clSilver |
Border color for the selected item. |
SelectedItemTextColor |
TColor |
clHighlightText |
Text color for the selected item. |
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.
BeginUpdate/EndUpdate locks/unlocks redrawing.
IndexOf returns the index of item by its Caption.
ItemHasParent returns True if the given item has a parent item.
GetItemParent 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.