[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomComboBox.AddHistoryItem

Add an item as the first entry in History List.

Declaration

Source position: stdctrls.pp line 375

public procedure TCustomComboBox.AddHistoryItem(

  const Item: string;

  MaxHistoryCount: Integer;

  SetAsText: Boolean;

  CaseSensitive: Boolean

);

procedure TCustomComboBox.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.

CaseSensitive

  

True means that the list can contain multiple items with the same text, differing in case.

Arguments

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.

CaseSensitive

  

True means that the list can contain multiple items with the same text, differing in case.

Description

When the item is already in the history list, it is moved to the begin of the list.

Otherwise the item is added as the first entry; when the list is full, the last item is removed.

See also

TCustomComboBox.AutoComplete

  

Allows to select items from partial input, of the begin of the item text.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.