GUI ScreenIO for Windows |
The menu definition looks complicated, but it is quite straightforward. In this case, we'll first create the high-level item File, which is the first item in the main menu of our Windows applications.
There are Three Types of menus that are defined in the same way using this panel.
To add a new item, right click the (initially empty) Menu Tree Structure, and the context menu will pop up.
Choose Add New Item.
Since the File item will have branches beneath it, it will not return an event; it's the top item of the branch. Therefore, just leave 88-name of event blank in the menu properties, enter the Menu Item Text and press the OK button.
Once we've added the top level item, we'll add a couple of subordinate items; Open, Close, and Exit.
Do this by selecting the menu item below which you want to add items, and right click to get the context menu again and then add the new item.
You can select Add New Item to create a new (sibling) item at the same level or Add Branch Item to create a child item of the selected menu item.
Note: You can also Copy/Paste individual items (or entire branches) from one panel to another: Open both panels at the same time, Copy from one panel's menus then close the menu editor, select the other panel, Open the menu editor, select the target, right click and indicate if you want to paste a branch or paste below.
Now, the menu definition panel looks like this:
Here's what your menu will look like when you run your application.
GUI ScreenIO automatically appends the text of the keyboard equivalent that you selected when your menu item is displayed.
Note: Right clicking any menu item allows you to edit its properties.
If you want to change the text of a menu at run time (via your program) there is an option on the Panel Properties which will break the text elements of the panel into separate labeled strings. This will provide a data field into which you can move new menu text to change the meaning of a menu item on the fly. The event id will remain the same. After changing menu content in this way, you need to tell the runtime to update menu items.
© 2000-2019 Norcom, all rights reserved |