TdxBarManager.BarByOldName(string) Method
Returns a toolbar by the name used in previous versions of the ExpressBars Suite.
Declaration
function BarByOldName(const AName: string): TdxBar;
Parameters
Name | Type |
---|---|
AName | string |
Returns
Type |
---|
TdxBar |
Remarks
In versions prior to the ExpressBars Suite v6, the BarByName function was used to access a toolbar by its name (a string). In the ExpressBars Suite v6 and later, toolbars’ Name property type is TComponentName and you can refer to them by their individual names. As such, the BarByName function is now obsolete.
You can use the BarByOldName method when converting older projects that use the BarByName function to the current ExpressBars Suite version. This method matches the AName‘s value with the bar’s OldName property value. When the old project is opened, this property is set to the value of the bar’s old Name property that was saved in the .dfm file.
If the search is successful, the method returns a reference to the bar instance; otherwise it returns nil.
AName specifies the bar’s old name.