- Code: Select all Expand view
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet, oBtn
LOCAL cVar := SPACE( 30 )
DEFINE DIALOG oDlg
@ 1, 1 GET oGet VAR cVar
@ 3, 1 BUTTON oBtn PROMPT "Close" ACTION oDlg:End()
oBtn:bLButtonUp = { || oGet:SetFocus() }
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
This is a possible solution: add the following method to TButton:
- Code: Select all Expand view
METHOD LButtonUp( nRow, nCol, nKeyFlags ) CLASS TButton
if ::bLButtonUp != nil .and. !IsOverWnd( ::hWnd, nRow, nCol )
return Eval( ::bLButtonUp, nRow, nCol, nKeyFlags )
endif
return nil
What do you think?
EMG