I tried to use OnLostFocus on controls, but it stop the next Action to run ...
here is the ssw,;
Code: Select all
#include "hmg.ch"
Function Main()
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 550 ;
HEIGHT 350 ;
MAIN ;
TITLE "MsgInfo function .... stop next event..."
DEFINE EDITBOX Edit_1
ROW 30
COL 30
WIDTH 210
HEIGHT 170
VALUE "This Editbox control has no MsgInfo for OnLostFocus."
END EDITBOX
DEFINE EDITBOX Edit_2
ROW 30
COL 280
WIDTH 210
HEIGHT 160
VALUE "This control has MsgInfo for the OnLostFocus."
ONLOSTFOCUS MsgInfo( "Leaving Editbox !")
END EDITBOX
DEFINE BUTTON Button_1
ROW 210
COL 40
WIDTH 100
HEIGHT 28
ACTION MsgInfo( "Button_1 Action")
CAPTION "Button_1"
END BUTTON
DEFINE BUTTON Button_2
ROW 210
COL 290
WIDTH 100
HEIGHT 28
ACTION Nil
CAPTION "Button_2"
ONLOSTFOCUS MsgInfo( "Button_2 LostFocus")
END BUTTON
DEFINE LABEL Label_1
ROW 260
COL 20
WIDTH 480
HEIGHT 20
VALUE "The Edit_2 OnLostFocus event prevent the next control event to occure..."
END LABEL
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return NIL