Forum Discussion

gberge's avatar
gberge
Occasional Contributor
4 years ago
Solved

Clearing a textbox in mobile devices in script

I have a problem where I need to enter in new text in a control that already has some text in it

 

I tried the following to overwrite the existing text:

 

  // Select the existing text in the texbox
  textbox.LongTouch(10, textbox.Height / 2)

  // Enter new text
  textbox.Keys(text);

 

While the LongTouch method does select all the text in the textbox, following it with the Keys method still appends the new text to the existing text.