TdxBarManager.GetUniqueItemName(TdxBarItemClass) Method
Generates a unique name for a bar manager’s item whose type is specified by the ABarItemClass parameter.
Declaration
function GetUniqueItemName(ABarItemClass: TdxBarItemClass): string;
Parameters
Name | Type |
---|---|
ABarItemClass | TdxBarItemClass |
Returns
Type |
---|
string |
Remarks
Use the GetUniqueItemName function to rename an existing item of the current bar manager or to generate a name for an item which has been created via code. In both cases the return value of this function must be assigned to the Name property of the item.
The GetUniqueItemName function assigns a name based upon the item’s type specified by the ABarItemClass parameter. For example, if the TdxBarButton class is passed by the parameter the GetUniqueItemName function will generate the “dxBarButtonN“ name, where N is the index given. So that the name is unique but it still shares the majority of its name with other items in the current bar manager’s Items collection.
An item can be found in the bar manager’s Items collection by its name via the GetItemByName method.
Note
An item’s name is case sensitive.