Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

Delphi
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