Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SelStart Bug?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SelStart Bug?
Miscellaneous
Thread ID:
00589456
Message ID:
00589456
Views:
72
Hi

Has anyone else noticed that the SelStart property is not updated properly when you use the Backspace key in an edtbox.

If I click in an editbox and check the SelStart value from the LostFocus event the value is correct. If I insert some text and then remove it with backspace key the selstart does no go back to the original value but returns the new value as if the new text was still in the control.

Therefore if I use from the Click event of a command button:
   This.Parent.editbox.value=Stuff(This.Parent.editbox.Value,This.Parent.editBox.selStart,0,"test")
The text is not inserted where I expected but further down the editbox.

I discovered this problem because I have a button on a form that inserts text into an edit box at the current cursor position. I use the method shown above.

Any suggestion how to fix this so that I can inserted the text at the current cursor position?

Thanks
Simon
Simon White
dCipher Computing
Next
Reply
Map
View

Click here to load this message in the networking platform