S SALTeNe New Member Licensed User Longtime User Dec 24, 2018 #1 hello i am trying to get the edittext1.text field to clear its text i set in visual designer when i select it. i have used all the methods that come with it and cannot seem to find a suitable solution. my code is as follows: Sub EditText1_FocusChanged (HasFocus As Boolean) If EditText1.Enabled = True Then EditText1.Text = "" Else EditText1.Text = EditText1.Text End If End Sub this is for focuschanged but as i stated i have tried the other methods as well. thanks for any help on this.
hello i am trying to get the edittext1.text field to clear its text i set in visual designer when i select it. i have used all the methods that come with it and cannot seem to find a suitable solution. my code is as follows: Sub EditText1_FocusChanged (HasFocus As Boolean) If EditText1.Enabled = True Then EditText1.Text = "" Else EditText1.Text = EditText1.Text End If End Sub this is for focuschanged but as i stated i have tried the other methods as well. thanks for any help on this.
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2018 #2 Try this: Code: Copy Sub EditText1_FocusChanged (HasFocus As Boolean) If HasFocus Then EditText1.Text = "" End If End SUb Upvote 0
Try this: Code: Copy Sub EditText1_FocusChanged (HasFocus As Boolean) If HasFocus Then EditText1.Text = "" End If End SUb