- Code: Select all Expand view
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet1, cVar1 := SPACE( 30 )
LOCAL oGet2, cVar2 := SPACE( 30 )
DEFINE DIALOG oDlg
@ 1, 1 GET oGet1 VAR cVar1
oGet1:bLostFocus = { || cVar2 := "Test", oGet2:Refresh() }
@ 2, 1 GET oGet2 VAR cVar2
@ 3, 1 BUTTON "&Close";
ACTION IF( !EMPTY( cVar2 ), oDlg:End(), MSGINFO( "cVar2 is empty" ) )
ACTIVATE DIALOG oDlg;
CENTER
? cVar2
RETURN NIL
A possible fix:
- Code: Select all Expand view
METHOD Click() CLASS TButton
if ! ::lProcessing
::lProcessing = .t.
if ::bAction != nil
::SetFocus() ///EMG
Eval( ::bAction )
endif
if ! ::lCancel .and. ::oWnd:hWnd != 0 // A.L. 21/04/03
Super:Click()
endif // A.L. 21/04/03
// Hernan Ceccarelli added 10-Junio-2001
if ( GetFocus() == ::hWnd )
::PostMsg( BM_SETSTYLE, BS_DEFPUSHBUTTON, 1 )
else
if ! ::lDefault
::PostMsg( BM_SETSTYLE, BS_PUSHBUTTON, 1 )
endif
endif
// Hernan Ceccarelli added 10-Junio-2001
::lProcessing = .f.
endif
return nil
EMG