Hi to all,
I have an EditText drawn in a panel, why the EnterPressed event does not work?
Sub Globals
DIm Txt as EditText
Dim Panelatt as Panel
......
Sub Activity_ Create(FirstTime as Boolean)
If FirstTime Then
Activity.Initialize("Activity")
Activity.LoadLayout("Main")
Panelatt.Initialize("")
Txt.Initialize("Txt")
End If
........
........
Sub Txt_EnterPressed
... not work....never raised
End Sub
the code is too long,
i just want to tell you that
Panelatt is an object in the Layout "Main" loaded with Activity.LoadLayout ("Main").
The other EditText (event EnterPressed and more) loaded in a different layout working correctly
I found the problem.
This code:
------------------------------------
Do While Panelatt.Visible = True
DoEvents
Loop
------------------------------------
prevents the EnterPressed event.
Why?
You should not use such a loop. DoEvents only handles graphic related messages. You should instead use a timer (though in this case I don't see any reason to wait for a panel to be visible, it is set by your code).