Skip to main content

TdxBarManager.GetUniqueToolbarName(string) Method

Generates a unique name for the bar manager’s toolbar adding an index to the string passed by the ABaseName parameter.

Declaration

function GetUniqueToolbarName(const ABaseName: string): string;

Parameters

Name Type
ABaseName string

Returns

Type
string

Remarks

Use the GetUniqueToolbarName function to rename an existing toolbar or to generate a name for a toolbar which has been created via code. In both cases the return value of this function must be assigned to the toolbar’s Name property.

The GetUniqueToolbarName function assigns a name based upon the string passed by the ABaseName parameter.

For example, if the “dxBarManagerBar” string is passed by the parameter the GetUniqueToolbarName function will generate the “dxBarManagerBarN“ name, where N is the index that is given. So that the name is unique but it still shares the majority of its name with other toolbars in the current bar manager’s Bars collection.

Note

A toolbar’s name is case sensitive.

A toolbar can be found in the bar manager’s Bars collection by its name via the BarByComponentName function.

See Also