x, y to selstart example

Is there an example of converting mousedown x and y to textarea.selstart? I also have text of different sizes.

It seems like TextArea.CharPosAtXY would work.

Thanks. It however returns 1 when it’s at least 16 characters in. Does it matter that there are several text areas. It shouldn’t by my mind.
I took the code straight from the example.

Sorry. It did give the correct number.
For some reason, my textarea is not highlighting the selected text. Got any suggestions about how to turn off/on highlighting?
Also SelLength is twice what it should be. I assume that is because it is UTF8. But will it matter in other calculations?

This must be in Windows, right? I reported, a long time ago, that TextArea selection isn’t how we expect it to be in Windows 7 and was told that’s just the way it works.

Not saying you didn’t find a new bug, but when I reported it, that’s what I was told.

Actually, It’s Mac. It’s been a while since I’ve checked Windows. You may be right. I think I posted a bug also.