Application Builder Tools > The Main Window Branch > The Main Window Node

The Main Window Node
The Main Window node () represents the main window of an application and is the top-level node for the user interface. It contains the window layout, the main menu specification, and an optional ribbon specification.
The Settings window for the Main Window contains the following sections:
General
The Title field contains the title of the application. The title is the text at the top of the main window. By default, it is the same as the title for the model used to create the application. The Show filename in title check box is selected by default. Clear it to exclude the application’s filename from the title.
To add an icon for the application other than the default COMSOL icon, specify an image file to use from the Icon list, which includes all of the images in the Images library, or click the Add Image to Library and Use Here button () to locate an image to use on the file system. That image then becomes a part of the Images library and is selected as the icon in the main window of the application. The Default setting loads cube.png. Click the Export button () to export the image to the file system (for use in another application, for example).
From the Menu type list, select the type of menu for the application:
Select Menu bar (the default) to use a main menu at the top of the application. The Main Window branch then includes a Menu Bar node and a Toolbar node, to which you can add menus and submenus with menu items, actions, and separators.
Select Ribbon to use a Windows-style ribbon toolbar at the top of the application. You can then, under Main Window, add a File Menu node (for an Exit command, for example) and a Ribbon node, to which you can add Ribbon Tab nodes. Under Ribbon Tab nodes, you can add Ribbon Section nodes to which you can add menus and submenus with menu items, actions, and separators.
The Status bar list controls what to show in the status bar. Select Progress when running (the default, which adds a COMSOL progress bar in the lower-right corner of the application; see Progress Bar for adding custom progress bars) or None.
Main Form
This section contains a reference to the form that the main window displays. Select the form to display from the Form list.
Size
From the Initial size list, select how to set the initial size of the application window:
Select Maximized to open the application window in a maximized state that fills the screen.
Select Use main form’s size (the default) to make the application window size adapted to the size of its main form, which is the form selected in the Main Form section above.
Select Manual to specify the application window’s initial size in the Width (default: 1280 pixels) and Height (default: 800 pixels) fields that appear.
About Dialog
In this section, you can specify the contents of the About dialog box and the placement of the link to that dialog box.
From the Placement list, choose one of the following options for the placement of the link:
Automatic (the default), which puts the link to the About dialog box in the following place:
-
The File menu, if the Menu type list is set to Ribbon and there is an added File Menu
-
The toolbar, if the Menu type list is set to Menu bar and there is a toolbar but no menus
-
File menu or Menu bar (depending on the setting in the Menu type list)
Ribbon or Toolbar (depending on the setting in the Menu type list)
Lower-right corner (an About hyperlink in the lower-right corner of the application’s main form). If there is no form in the application, it uses the automatic placement instead.
Clear the Show COMSOL Information check box if you do not want to include the standard COMSOL information (logotype, version number, and information about products used).
In the Custom text field, add any text that you want to include in the About dialog box. The text appears above the license, patent, and trademark information. If you include a web address, it will appear as a hyperlink in the About dialog box. The web address must be a valid URL that starts with http:// or www.