Cursor location - in pixels - in textarea

BlitzMax Forums/MaxGUI Module/Cursor location - in pixels - in textarea

Koriolis(Posted 2007) [#1]
Does anyone know a multi-platform way of determining the exact location in pixels of the cursor in a textarea?
It must also work even when the text is scrolled (that's the main problem).
Even a convoluted solution, and preferably without module tweaks.

Thanks.


grable(Posted 2007) [#2]
Take a look at this: Adding a TextAreaCursorXY

Windows & MacOSX doesnt need mod tweaking, but the Linux one does.


Koriolis(Posted 2007) [#3]
Thank you very much. Too bad it requires a module tweak. Based on your code, I'll probably look if I can add the feature on top of the current maxGUI implementation rather than tweaking it. I just want my code to stay self-contained and not be broken by any update.

If anyone has another solution, I'm still ready to take it.


Mark Tiffany(Posted 2007) [#4]
I was kind of hoping this tweak might make itself into the official mods, seeing as it works on all three platforms...


SebHoll(Posted 2008) [#5]
Two new functions, TextAreaCharX() and TextAreaCharY(), are now available from the MaxGUI SVN with implementations on all platforms.