TCustomComboBox.AddHistoryItem procedure
Add an item as the first entry in the history list for the control.
Declaration
procedure AddHistoryItem(const Item: string; MaxHistoryCount: Integer;
SetAsText: Boolean; CaseSensitive: Boolean)
procedure AddHistoryItem(const Item: string; AnObject: TObject;
MaxHistoryCount: Integer; SetAsText: Boolean;
CaseSensitive: Boolean)Arguments
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. |
AnObject | The object associated with the item; can be Nil. |
Description
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.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
