|
-
Jul 1st, 2010, 08:31 AM
#1
Thread Starter
Member
Problems with textbox.selstart
Guys is there a better method of getting the cursor position?
This may be a real easy question but its eluding me........
I am writing a program that requires some Central European characters in the textbox. Setting the font to allow these is easy enough, even to mapping the keys on the keyboard with a keypress event triggering a change of ascii char with something like this in the keypress trigger.
If KeyAscii = 39 Then
TextPolish.Text = stringA + Chr$(185) + stringB: KeyAscii = 0
End If
where stringA is the left part of the string before the cursor and stringB is the right part after the cursor (if exists)
BUT> i am having an issue with textbox.selstart , if the user wants to alter the text and presses the back arrow then the text.selstart function returns its position +1 position. If the user deletes the whole word and starts again then its ok.
when the user starts typing again,
how can i get the cursor position as it is within the textbox?
another question
how do i set the cursor after the last character?
textbox.selstart= len(textbox.text)
The above is putting the cursor before the last character
Many thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|