Retrieve text in an EditText

cbanks

Active Member
Licensed User
Longtime User
I'd like to have a user type in an EditText and then when they click a save button I want to save what they typed in the EditText box. I have some code below I'm testing with that doesn't seem to work. in the test I'm just trying to toastmessage what has been typed in the box. Does anyone know what I'm doing wrong? Here is the code:

'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

Dim panel1 As Panel
Dim Button1 As Button
Dim edittext1 As EditText
End Sub

Sub Activity_Create(FirstTime As Boolean)

activity.LoadLayout("asdf")
panel1.Visible = True
edittext1.Initialize("")

End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

Sub button1_click
Dim typedin As String
typedin = edittext1.text
ToastMessageShow(typedin,False)
End Sub
 
Last edited:

rfresh

Well-Known Member
Licensed User
Longtime User
Try using a Messagebox to see if you can retrieve the text, it looks like you should be able to.
 
Upvote 0
Top