FUNCTION MAIN()
LOCAL oDlg
LOCAL oCombo
LOCAL cVariab := SPACE( 10 )
LOCAL CbRet := .T.
DEFINE DIALOG oDlg
@ 1, 1 COMBOBOX oCombo VAR cVariab ITEMS { "AAAAAA", "BBBBBB", "CCCCCC", "DDDDDD", "EEEEEE" }
oCombo:bGotFocus := { || CbRet := .F. }
oCombo:bLostFocus := { || CbRet := .T. }
ACTIVATE DIALOG oDlg CENTER VALID CbRet
? "Dialog closed"
RETURN NIL
ACTIVATE DIALOG oDlg CENTER VALID ! GetASyncKey(VK_ESCAPE)
METHOD KeyDown( nKey, nFlags ) CLASS TComboBox
if nKey == VK_ESC
::Close()
return 1
endif
return Super:KeyDown( nKey, nFlags )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 58 guests