EnterPressed

micro

Well-Known Member
Licensed User
Longtime User
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
 

stevel05

Expert
Licensed User
Longtime User
If you have included the Txt and panel views within the Loaded Layout the you don't need to initialize them in your code:

Panelatt.Initialize("")
Txt.Initialize("Txt")

and Activity.Initialize("Activity")

Try removing these lines and see if it helps.
 
Upvote 0

micro

Well-Known Member
Licensed User
Longtime User
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
 
Upvote 0

micro

Well-Known Member
Licensed User
Longtime User
I found the problem.
This code:
------------------------------------
Do While Panelatt.Visible = True
DoEvents
Loop
------------------------------------
prevents the EnterPressed event.
Why?
 
Upvote 0
Top