Hi All,
I expect similar questions have been asked about this, so apologies if this has already been answered.
Basically I want to return the position of the cursor when the mouse is clicked anywhere in a textbox.
I know you can use SelStart, but what is causing me a problem is that it is not resetting for each line.
Example text:
Order No Description Qty Price
----------- -------------- ---- ------
1234567 Item Name 1 12.00
If I click the mouse between the "d" and "e" in the word "Order", SelStart returns 3, which is fine.
However if I was to click the mouse between the "3" and "4" of the Order Number, I would still expect it to return 3 because its 3 characters from the left on that specific line, but SelStart returns the cursor position based on a count from the first character in the text box which is what I don't want.
I can get the X position using CurLine, I'm just stuck on getting the Y position so that I can generate X and Y co-ordinates.
It might be an obvious solution, but I'm having a bit of a mind blank and just can't see it, so any help would be appreciated.
Thanks.
Bookmarks