API:Vcl.ActnList.TShortCutList.Add
Delphi
function Add(const S: String): Integer; override;
C++
virtual int __fastcall Add(const System::UnicodeString S);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ActnList.pas Vcl.ActnList.hpp |
Vcl.ActnList | TShortCutList |
Description
Adds a new string to the list.
Vcl.ActnList.TShortCutList.Add inherits from System.Classes.TStringList.Add. All content below this line refers to System.Classes.TStringList.Add.
Adds a new string to the list.
Call Add to add the string S to the list. If the list is sorted, S is added to the appropriate position in the sort order. If the list is not sorted, S is added to the end of the list. Add returns the position of the item in the list, where the first item in the list has a value of 0.
Note: For sorted lists, Add will raise an EListError exception if the string S already appears in the list and Duplicates is set to dupError. If Duplicates is set to dupIgnore, trying to add a duplicate string causes Add to return the index of the existing entry.
See Also
Code Examples