13.2 The title bar

By default, the string shown in the title bar is constructed from the arguments passed into the AFXApp constructor, as shown in the following statement:

AFXApp(appName, vendorName, productName, 
    majorNumber, minorNumber, updateNumber, prerelease)

The title is generated using the format shown in the following statement:

productName + ' Version ' + majorNumber + '.' + minorNumber + 
    '-' + updateNumber
For example, the following statement,
AFXApp(productName="ABAQUS/CAE", 
    majorNumber=6, minorNumber=6, updateNumber=1)
generates the following string in the title bar: ABAQUS/CAE Version 6.6-1

If you do not specify the major, minor, and update numbers in the application constructor, they default to the current ABAQUS/CAE version numbers. Similarly, if you specify version numbers but you do not specify a product name, the version numbers default to the current ABAQUS/CAE version numbers. If you set the prerelease argument in the AFXApp constructor to TRUE, the update number is preceded by PRE. For example, ABAQUS/CAE Version 6.6-PRE1.

In addition, if the user has opened a model database, the title bar string contains the name of the current model database; for example, ABAQUS/CAE Version 6.6–1 MDB: C:\projects\cars\engines\turbo-1.cae.

If the name of the current model database, including the path, exceeds 50 characters, the name will be abbreviated by showing only the first and last 25 characters separated by “…”.

If you do not want the default title processing, you can override it by specifying a title in the AFXMainWindow constructor. If you specify a title in the AFXMainWindow constructor, the ABAQUS GUI Toolkit ignores the arguments in the application constructor and uses the title specified. The model database name and the name of the current viewport (when maximized) will continue to be shown in the title bar, even if you override the default title processing.

You can access the string shown in the window title bar using the following statement:

title = getAFXApp().getAFXMainWindow().getTitle()