TSRVCustomComboBox

Top  Previous  Next

TSRVCustomComboBox is the base class for combo box controls.

Unit SRVComboBox;

Syntax

TSRVCustomComboBox = class(TSRVEditControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

Properties and events

Public properties

Property

Type

Default value

Meaning

AutoComplete

Boolean

True

Specifies whether the combo box automatically completes words that the user types by selecting the first item that begins with the currently typed string.

AutoDropDown

Boolean

False

Specifies whether the drop-down list drops down automatically in response to user keystrokes.

AutoSize

Boolean

True

Determines whether the height of the edit region automatically resizes to accommodate the text height

CharCase

TSRVEditCharCase

srvecNormal

Determines the case of the text within the edit region:

srvecNormal, srvecUpperCase, srvecLowerCase

Color

TColor

clWindow

Background color of the editing region.

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.

DropDownCount

Integer

5

Specifies the maximum number of items displayed in the drop-down list.

DropDownHints

Integer

10

Defines how many hints (suggestions) are visible in a list.

HideSelection

Boolean

True

Determines whether the visual indication of the selected text remains when focus shifts to another control.

HintsItemSkinSchemeIndex

Integer

 

An index in SkinManager.CurrentSkin.BoxSchemes collection, for items in the list of hints (suggestions)

HintsScrollBarSkinSchemeIndex

Integer

 

An index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection, for scrollbars in the list of hints (suggestions)

HintsSkinSchemeIndex

Integer

 

An index in SkinManager.CurrentSkin.BoxSchemes collection, for the list of hints (suggestions)

ImageList

TCustomImageList

 

Specifies the images that appear next to items in the list box.

ItemHeight

Integer

20

Specifies the height in pixels of an item in an owner-draw list.

ItemIndex

Integer

 

Specifies the ordinal number of the selected item.

ItemWidth

Integer

0

If set to a positive value, defines a width of a drop down list.

Items

TSRVCBoxItemCollection

 

Items, a collection of TSRVCBoxItem.

ListMarginHeight

Integer

2

Height of the top and bottom margins of the drop down list.

ListMarginWidth

Integer

3

Width of left and right margins of the drop down list.

MaxLength

Integer

0

Specifies the maximum number of characters the user can type into the edit portion (0 for unlimited)

Modified

Boolean

 

Indicates whether the user edited the text of the edit control.

ReadOnly

Boolean

False

Determines whether the user can change the text of the edit region.

ReadOnly 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.

Sorted

Boolean

False

Specifies whether the items in a list box are arranged alphabetically.

Style

TComboBoxStyle

csDropDown

Determines the display style of the combo box.

Text

String

 

Text in the editing region.

UseItemFontNames

Boolean

False

Specifies whether the FontName properties of items are used to display their Captions.

Public events

OnChange occurs when the user changes the text displayed in the edit region.

OnDropDown occurs when the user opens the drop-down list.

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.

OnEditHints occurs when a list of hints (suggestions) is about to be displayed. See the section about "Hints (Suggestions)" for TSRVEdit.

 

See also properties and events inherited from TSRVEditControl.

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

SRVEdit TSRVComboBox


ScaleRichView © Ilya Zelensky & Sergey Tkachenko