Jeff,
it is a little bit tricky.
I noticed ( with a alert ) during reading the lines in a multiline get,
the focus status changed for each line from focus to lost focus.
Maybe a bug ?
see what happens, changing these lines of the multiline get inside the working function to :
@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE
oGet1:bGotFocus := {|| MsgAlert( "Got Focus" ), oGet1:SetColor( , 11251710 ), oGet1:Refresh() }
oGet1:bLostFocus := {|| MsgAlert( "Lost Focus" ), oGet1:SetColor( , 15973519 ), oGet1:Refresh() }I got it working like :function Main()
Local oGet1, oGet2,
lFocus1 := .F.local cVar:="lalalalala",cVar1:="hoplalalalala"
DEFINE DIALOG oDlg FROM 1,10 TO 24,60
@ 1, 12 BUTTON "&End" OF oDlg ACTION oDlg:end()
// only read focus status once !!!
// ---------------------
@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE
oGet1:bGotFocus := {|| lFocus1 := .T.,;
IIF( lFocus1 = .T., oGet1:SetColor( , 11251710 ), NIL ), oGet1:Refresh() }oGet1:bLostFocus := {|| lFocus1 := .F.,;
oGet1:SetColor( , 15973519 ), oGet1:Refresh() }@ 8, 10 GET oGet2 VAR cVar1 OF oDlg SIZE 95, 15
ACTIVATE DIALOG oDlg
return NIL
Best Regards
Uwe