From 0fa28735e67afb48d198ebf2d8e1c47b756559a9 Mon Sep 17 00:00:00 2001 From: Andi Jahja Date: Sat, 31 Jul 1999 01:44:47 +0000 Subject: [PATCH] menu to test program --- harbour/tests/working/testmenu.prg | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 harbour/tests/working/testmenu.prg diff --git a/harbour/tests/working/testmenu.prg b/harbour/tests/working/testmenu.prg new file mode 100644 index 0000000000..5d6ba8f702 --- /dev/null +++ b/harbour/tests/working/testmenu.prg @@ -0,0 +1,46 @@ +// +// $Id$ +// + +// Harbour menuto + +#command @ , PROMPT [MESSAGE ] ; + => __AtPrompt( , , , ) + +#command MENU TO ; + => := __MenuTo( {|_1| if(PCount() == 0, , := _1)}, # ) + +#include "box.ch" +******************************************************************************** +function main() +******************************************************************************** +local nchoice +local amenu := {"Option ~One","Option ~Two","Option T~hree","Option ~Four"} +local i +local ccolor +local scr := savescreen(0,0,maxrow(),maxcol()) + +set wrap on +set message to 24 + +scroll() + +ccolor := setcolor("w+/n,w+/b,b/n,w+/n,gr+/n") + +dispbox( 10, 13, 10 + len( amenu) + 1, 30, B_SINGLE + ' ' ) + +for i := 1 to len( amenu ) + @10+i,15 prompt amenu[i] message "This Is " + strtran(amenu[i],"~","") +next + +menu to nchoice + +qout("You Have Chosen Option " + str(nchoice,1) + " !") + +inkey(0) + +setcolor( ccolor ) + +restscreen(0,0,maxrow(),maxcol(),scr) + +return nil