The Main Window Editor
In the application tree, the Main Window node represents the main window of an application and is also the top-level node for the user interface. It contains the window layout, the main menu specification, and optional ribbon, and subwindow specifications. The Main Window Editor, visible whenever the Main Window node is active, lets you design menu bars, ribbon tabs, and subwindows.
General
The Settings window contains a General section with the following settings:
The Title is the text at the top of the main window in an application, with the Icon shown to the far left of this text. By default, the Title is the same as the title of the model used to create the application. Keep the Show filename in title checkbox selected if you wish to display the file name of the application to the left of the Title.
In the Icon list, select an image from the library or add an image (*.png) from the local file system to the library and use it as an icon. If you add a new image, it will be added to the image library and thereby embedded into the application. You can also export an icon by clicking the Export button to the right of the Add Image to Library and Use Here button.
The Main Window node in the application tree has two child nodes, the names and purposes of which depend on the Menu type setting. There are two available Menu type options: Ribbon and Classic menu. By default, the menu type is set to Ribbon, which includes the child nodes File Menu and Ribbon. When the Classic menu type is selected, the child nodes are Menu Bar and Toolbar.
The Main window type setting lets you select the type of application layout: Subwindows or Single window. The Subwindows option makes it possible to organize forms into subwindows that, while the application is running, can be detached and docked.
The Status bar list controls what is shown in the status bar. From the list, select the Progress option to display a progress bar, otherwise, select None. Note that you can also create custom progress bars by writing method code.
Main Form
The Main Form section is visible if the Main window type is set to Single window. It contains a reference to the form that the main window displays.
This setting is important when using a form collection because it determines which form is displayed as the main window when the application is opened for the first time.
Window Layout
The Window Layout section is visible if the Main window type is set to Subwindows.
Subwindows can be defined in the lower part of the Main Window Editor. You work with subwindows in a way that is similar to forms when in grid mode. For more information, see Subwindows.
Size
In the Size section, the Initial size setting determines the size of the main window when the application is first started.
There are two or three Initial size options, depending on the Main window type setting:
Maximized results in the window being maximized when the application is run.
For the Single window option, Use main form's size uses the size of the main form; See The Individual Form Settings Windows. The main form is defined by the Main Form section. This option further adds the size required by the main window itself, including: the window frame and title bar, main menu, main toolbar, and ribbon. This size is computed automatically.
Manual lets you enter the pixel size for the width and height. In this case, nothing is added to the width and height. When using this option, you need to ensure that there is enough room for the window title, ribbon, and menu bar.
In addition, there is a Center on screen checkbox that is applicable to any Size setting that does not correspond to a maximized window.
When the Main window type is set to Subwindows, the Use main form's size option is not applicable and is therefore removed. In this case, the Initial size is changed to Maximized.
For more information on the Use main form’s size option, see The Form Settings Window and the Grid.
About Dialog
The About Dialog section contains settings for customizing parts of the About This Application dialog, which contains legal information.
The Placement option lets you choose between Automatic, File menu, Ribbon, Lower-right corner, or Lower-left corner. The Lower-right corner and Lower-left corner options are available only when the Main window type is set to Single window and will place a hyperlink referencing the About This Application dialog in the corresponding corner of the application user interface. If selected, the Show COMSOL information checkbox will display the COMSOL software version and product information. Any text entered in the Custom text field will be displayed above the legal text in the dialog. In the Custom text field, words containing https or www will be interpreted as hyperlinks, if possible. For example, https://www.comsol.com or www.comsol.com will be replaced with a hyperlink.
Language Localization
The Language Localization section contains settings for the localization of the application.
The Localization setting determines whether the application should be localized using language files or not and is disabled by default. The Language setting specifies the language files that are used for localization. By default, the From preferences option is selected and the language used when running the application is determined by the language preference setting in COMSOL Multiphysics, COMSOL Server, or a compiled application. For more information on localization, see the Application Builder Reference Manual.