Thank you very much Mauricio.
I solved the problem with a mixture of MLEFTDOWN(), MROW() and MCOL()
Best Regarsd
GVS
Maurizio la Cecilia escribió:
I think that when cVar1 get lost his focus and valid clause is evaluated the
pushbutton hit focus but not yet sets the buffer property.
You could try with:
FUNCTION Func1(xVar1, xGetList)
RETURN xGetList[3]:hasFocus .or. !EMPTY(xVar1)
Not tested, however, as i don't use cl53 behaviour.
Best regards.
Maurizio la Cecilia
-----Messaggio originale-----
Da: Guillermo Varona Silupú [mailto:gvar...@ec-red.com]
Inviato: giovedì 17 settembre 2009 0.31
A: Harbour Project Main Developer List.
Oggetto: [Harbour] How do I know if the button was pressed?
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
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour