[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DisplayMenu
Purpose Displays a superb looking menu!
Decln. DisplayMenu(MenuDef:Menu_Record;W:boolean;var Choice,
ECode:integer);
Remarks MenuDef is the name of the menu record variable.
W indicates if the menu should be removed and the original screen
contents restored upon menu completion.
Choice is returned with the user's menu selection.
ECode is set to 0 for successful menu selection and 1 if the user
escaped.
Example
VAR
MAIN_MENU : MENU_RECORD;
CHOICE, ERROR : BYTE;
BEGIN
MENU_SET(MAIN_MENU);
WITH MAIN_MENU DO
BEGIN
HEADING1 := 'MAIN MENU';
TOPIC[1] := ' LOAD ';
TOPIC[2] := ' SAVE ';
TOPIC[3] := ' PRINT ';
TOPIC[4] := ' QUIT ';
TOTALPICKS := 4;
END;
CHOICE := 1;
REPEAT
DISPLAYMENU(MAIN_MENU,FALSE,CHOICE,ERROR);
CASE CHOICE OF
1 : LOAD_STUFF;
2 : SAVE_STUFF;
3 : PRINT_STUFF;
4 : EXIT_PROC;
END;
UNTIL TRUE=FALSE;
END;
See Also:
Menu_Set
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson