problem with calling MsgBox in Event OnExit-Method
Publicado: Mié Oct 12, 2005 5:36 pm
Hello,
in a combobox I want to examine and - if necessary - replace oComboBox:cText
with the correct written Item of oComboBox:aItems.
I use for this the Event-Method OnExit.
METHOD OnExit( oSender, oNextCtl ) CLASS LSEdit
local lOk:=.F.,nPos
nPos:=oSender:FindStringEx(oSender:cText,1)+1
IF lOk:=nPos>0
oSender:cText:=oSender:GetText(nPos)
ELSEIF lOk:=MsgYesNo("'"+oSender:cText+"' ist unbekannt!"+CRLF+;
"Soll der Begriff mit dieser
Schreibweise"+CRLF+;
"in die Gerichtsliste
übernommen werden?","Gerichtsliste")
//...... doing something
//......
ENDIF
RETURN lOk
This is working correctly if the MsgBox will not be called.
In this case, the ComboBox is keeping the focus and the cursor is no more
visible.
What to do?
Regards
Ingo
in a combobox I want to examine and - if necessary - replace oComboBox:cText
with the correct written Item of oComboBox:aItems.
I use for this the Event-Method OnExit.
METHOD OnExit( oSender, oNextCtl ) CLASS LSEdit
local lOk:=.F.,nPos
nPos:=oSender:FindStringEx(oSender:cText,1)+1
IF lOk:=nPos>0
oSender:cText:=oSender:GetText(nPos)
ELSEIF lOk:=MsgYesNo("'"+oSender:cText+"' ist unbekannt!"+CRLF+;
"Soll der Begriff mit dieser
Schreibweise"+CRLF+;
"in die Gerichtsliste
übernommen werden?","Gerichtsliste")
//...... doing something
//......
ENDIF
RETURN lOk
This is working correctly if the MsgBox will not be called.
In this case, the ComboBox is keeping the focus and the cursor is no more
visible.
What to do?
Regards
Ingo