How to implement menu in Progress 4gl?

Status
Not open for further replies.
N

N.Molderf

Guest
This code from http://documentation.progress.com/

DEFINE VARIABLE mn AS CHARACTER EXTENT 5 FORMAT "x(20)"
INITIAL [ "1. Add ", "2. Edit ", "3. Report", "4. Other ", "X. Exit" ].

DEFINE VAR sbmn AS CHAR EXTENT 3 FORMAT "x(20)"
INITIAL [ "1.1", "1.2", "1.3", "1.4"].

DEFINE VARIABLE proglist AS CHARACTER EXTENT 5
INITIAL [ "proc1.p", "proc2.p", "proc3.p", "proc4.p", "proc5.p" ].

REPEAT :
DISPLAY mn WITH NO-LABELS ATTR-SPACE
TITLE "Main Menu"
FRAME f-menu WIDTH 30.
HIDE MESSAGE.

CHOOSE FIELD mn GO-ON (F5) AUTO-RETURN
WITH FRAME f-menu.

IF SEARCH (proglist[FRAME-INDEX]) = ?
THEN DO:
MESSAGE "The program " proglist[FRAME-INDEX] " does not exists".
MESSAGE "Please make another choice".
END.

ELSE RUN VALUE(proglist[FRAME-INDEX]).

IF FRAME-INDEX = 5 THEN LEAVE.

END.


I want to add other sub-menu when someone presses to first row on mainmenu and it will be use the sbmn variable for this sub-menu.
upn3a.png


Continue reading...
 
Status
Not open for further replies.
Top