If it is necessary to display a message to the user, it enters an infinite cycle
" got the focus", " lost the focus".
IIs this correct?
Or where is the error?
Code: Select all
If OpenWindow(0, 100,100, 250,200, "")
StringGadget(1, 100,20, 50,25, "abc")
StringGadget(2, 100,50, 50,25, "xyz")
Repeat
Select WindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case 1
Debug "gadget 1"
Select EventType()
Case #PB_EventType_Change : Debug "The text has been modified by the user."
Case #PB_EventType_Focus
Debug "The StringGadget got the focus."
MessageRequester(""," got the focus")
Case #PB_EventType_LostFocus
Debug "The StringGadget lost the focus."
MessageRequester(""," lost the focus")
EndSelect
EndSelect
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
EndIf