Building a Menu System in OPL Code Cascading Menus

As well as separate menu cards, there is another way to present information in a menu. This is through the use of cascading menus. A cascade in this respect is a menu option that, when selected, will pop up a second list of menu options the user can choose from.

To use this feature, you firstly define the cascading menu by using the mCASC command, in the same way as you would use the mCARD system. The title (first string) in mCASC must be the same text as the menu option that will call up the cascade. Now, as long as the cascade is defined before the menu card it will appear in, you can place it in the menu card by using the title of the cascade (as defined at the start of the mCASC command) and appending a ">" symbol. For any menu item that you don't want to have a hot key you can specify a value less than or equal to 32 instead. This always applies to mCASCs. Here, we're using the value 16.

Here's our menu code, now with a cascading menu option called "More" that appears as the last entry in the first menu card:

mINIT

mCASC

"More","Option 5",%e,

"Option 6",

%f

mCARD

"Convert","Option 1",

%a,"Option

2",%b,"More>",16

mCARD

"Edit","Option 3",%c,

"Option 4",

%d

MenuResult%=MENU(LastMenu&)

U File View Find Acc/Cat Invest Orders Currency Tools

Account Balances

Ctrl+B

Category Balances Standing Orders

Splits/transfers for a transaction All splits for this selection Zoom in i ) s sen prion

Shift+Ctrl+B

Shift+Ctrl+D

Ctrl+V

Ctrl+X

Ctrl+Z

K^rer Amount eaten 1 ry Bal;

Select

Cancel

Figure 4.1 ABP menu screen

0 0

Post a comment

  • Receive news updates via email from this site