[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Add an item as the first entry in the history list for the control.
Source position: stdctrls.pp line 412
public procedure TCustomComboBox.AddHistoryItem( |
const Item: string; |
MaxHistoryCount: Integer; |
SetAsText: Boolean; |
CaseSensitive: Boolean |
); |
const Item: string; |
AnObject: TObject; |
MaxHistoryCount: Integer; |
SetAsText: Boolean; |
CaseSensitive: Boolean |
); |
Item |
|
The string to be added to the list. |
MaxHistoryCount |
|
The maximum number of items that can be added to the history. |
SetAsText |
|
When True the string also is copied into the edit box for the control. |
CaseSensitive |
|
True means that the list can contain multiple items with the same text, differing in case. |
Item |
|
The string to be added to the list. |
AnObject |
|
The object associated with the item; can be Nil. |
MaxHistoryCount |
|
The maximum number of items that can be added to the history. |
SetAsText |
|
When True the string also is copied into the edit box for the control. |
CaseSensitive |
|
True means that the list can contain multiple items with the same text, differing in case. |
AddHistoryItem is a procedure used to add the values in Item and AnObject to the beginning of the list items displayed for the control. AddHistoryItem uses the value in CaseSensitive to determine if case is significant when comparing the value in Item to the existing value at the beginning of Items.
AddHistoryItem calls the InsertObject method in Items to store the values at the initial position in the Items list (ordinal position 0). When Item exists at another position in Items, it is removed.
MaxHistoryCount contains the maximum number of entries allowed in the Items property. When the number of entries in Items exceeds the value in MaxHistoryCount, the excess is removed from the end of the Items property.
When SetText is True, the value in Item is stored to the Text property.
|
The list of items displayed in the combo-box control. |
|
|
The value in the edit box for the control. |
|
Version 3.2 | Generated 2024-02-25 | Home |