Skip to main content

TdxBarManager.GetUniqueToolbarCaption(string) Method

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

Declaration

function GetUniqueToolbarCaption(const ABaseName: string): string;

Parameters

Name Type
ABaseName string

Returns

Type
string

Remarks

Use the GetUniqueToolbarCaption function to give a new caption to an existing toolbar or to generate a caption for a toolbar which has been created via code. In both cases the return value of this function must be assigned to the Caption property of the toolbar.

This function assigns a name based on the string passed by the ABaseName parameter.

For example, if the “Bar” string is passed by the parameter the GetUniqueToolbarCaption function will generate the “BarN“ caption, 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

The toolbar’s caption is case sensitive.

A toolbar can be found in the bar manager’s Bars collection by its caption via the BarByCaption method.

See Also