Posts: 54
Threads: 30
Joined: Jul 2008
Reputation:
0
11-23-2009, 03:18 PM
Hi all
When testing a VB6 application, I am using .SetSelection to select all text in a vbedit object and replacing with new value.
For some reason, the .SetSelection often fails and my script stops due to wrong value in the vbedit object.
Is there another way to select or even better, clear the values of a vbedit object ?
Posts: 54
Threads: 30
Joined: Jul 2008
Reputation:
0
11-23-2009, 04:24 PM
Hi Mahesh
My app is not a web app, but a windows application written in VB6.0. What i need is a way to clear a vbedit field before entering new text.
Example. in my vbedit field "txtAge" i have the default value 65. My new value is 40. If i just just .type "40", the default value wont be erased.
Using setSelection 0,0,0,2 works sometimes, but is not reliable.
Posts: 54
Threads: 30
Joined: Jul 2008
Reputation:
0
12-08-2009, 07:43 PM
Thx for your input guys. For some reason, neither of above worked and my vbedit field was not cleared.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
12-09-2009, 11:21 AM
Can you paste what you have tried so far?
Posts: 54
Threads: 30
Joined: Jul 2008
Reputation:
0
12-09-2009, 02:42 PM
Hi Saket.
I've tried all of the above and all I did was changing the code to correspond to my objects. Still none of the solution worked.
What did work was using .setSelection 0,0 and then adding a handful of lines with .type micDel
This is not the best way to do it, but due to lack of time, I have to go with this solution