613-518-1166 info@zimdatabases.com

ZIM Development Center (DC) for Zim 7

Application Windows

< All Topics

An application window corresponds to the main application window. It generates a window, a menu, and a form. The default form displays a bitmap. Typically, application windows are used to launch other windows within the application. Application window components also generate an event loop program and a window management program for the main application window. Application windows have special exit properties. If the window receives an EXIT action (e.g. by typing Ctrl+F4 in the window), all windows in the application are also closed. If an EXITAPPLICATION action (e.g. by typing Alt+F4) is received by any window in the application, it is translated into an EXIT action for the main application window.

When you Edit an application window component, a dialog displays showing the items on the main menu of the application window. You can edit the main menu as follows:

To:

Do this:

Delete a menu item.

Click on the specific menu item and clear the label. Items with blank labels are removed when you select OK.

Add a menu item.

If the new menu item is be to the right of existing items, move the cursor to the next available position and enter the new menu label. If the new item is to be inserted between existing items, move the cursor to the item that is to be to the left of the new item and select the Shift button. This opens a blank spot in the menu. Enter the label for the new item. Labels are entered in the same way they are entered in the Screen Painter. Place an ampersand (&) before the character you wish to use as a keyboard accelerator.

Edit the submenu beneath a specific menu item.

Double click on the specific menu item. A submenu dialog appears showing the current submenu.

Discard all changes.

Select the Cancel button.

To accept all changes, generate new components, regenerate the application window objects and code.

Select the OK button. If you associated menu items with new components, they are created first. Then the application window menu and form is recreated and the code is regenerated.

 

Working with the submenu dialog is very similar. However, the submenu dialog shows the actions associated with specific menu items. In particular, it shows what type of action is associated with an item (e.g. call an existing application component) and the name of the component.

To:

Do this:

Delete a menu item.

Click on the specific menu item and clear the label. Items with blank labels are removed when you select OK in the Application Window edit dialog.

Add a menu item.

If the new menu item is to be below existing items, move the cursor to the next available position and enter the new menu label. If the new item is to be inserted between existing items, move the cursor to the item that is to be above the new item and select the Shift button. This opens a blank spot in the menu. Enter the label for the new item. Labels are entered in the same way they are entered in the Screen Painter. Place an ampersand (&) before the character you wish to use as a keyboard accelerator.

Edit the submenu beneath a specific menu item.

Double click on the specific menu item. Another submenu dialog appears showing the current submenu.

Define a horizontal separator menu item.

A horizontal separator is displayed as three dashes (‘—‘). To define a menu item as a horizontal separator, define the item as described above and make sure the label is three dashes.

Define the action (“callback”) to be associated with a menu item.

Select the Callback button. The Callback dialog appears. You can associate a predefined system action with a menu item (these are provided either directly by Zim or by the Application Framework), a command line (e.g. to call an existing program you have written), a call to an existing application component, or a call to a new application component. If you indicate that you want to call an existing component, you are presented with a list of components. If you want to call a new component, you must select what type of component you want and give the component a unique name. This new component is created and generated when you select OK in the main menu dialog.

Accept all changes.

Select the Close button. Note that there is no Cancel button in the submenu dialog. If you want to discard changes, you must select Cancel in the main menu dialog.

 

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents