In this code:
******************************************************
#include "Inkey.ch"
PROCEDURE Main
LOCAL cVar1 := cVar2 := SPAC(10), oPsw, GetList := {}, lBtn := .T.
SET(_SET_EVENTMASK, INKEY_ALL)
MSETCURSOR(.T.)
SETMODE(25,80)
CLS
@ 10, 10 SAY "Entrada1:" GET cVar1 VALID Func1(cVar1,GetList)
@ 11, 10 SAY "Entrada2:" GET cVar2
@ 12, 10 GET lBtn PUSHBUTTON CAPTION " E&xit " STATE {|| ReadKill(.T.)}
COLOR "W/G,W+/G,G/N,W+/G"
READ
return
FUNCTION Func1(xVar1, xGetList)
? xGetList[3]:buffer
wait
RETURN !EMPTY(xVar1)
*****************************************************
How do I know if the button was pressed?
Buffer is supposed to contain this information, but always returns NIL
The idea is to exit the program by pressing the button, even if this
cVar1 empty, but the VALID clause does not.
Any help / idea?
TIA
Best Regards
GVS
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour