How to attach a textbox to the cursor

I’m currently working on a update for my less/sass compilers, I wanted to improve the autocompletion.
Currently I’m using the scimoz.autoCShow function for the autocompetion, but this function is a bit buggy when it comes to white space.
Now I’m building it with the textbox autocomplete and got the autocompetion working, the only thing I’m struggling with is how to attach this to the cursor, or pretend by calculating the css position of the cursor and css the autocompetion to the right spot.

I’ve asked to provide a module in the SDK for working with auto-complete windows, but there’s no progress on that.

About your question… you have to calculate it somewhere in JS.

@Defman thanks, i already came across that post on my search on a better autocompletion, i don’t know if it was on the same post but i read somewhere that this can be done with the textbox autocomplete, that’s why i moved to this direction. Do you know a way to get the postion of the cursor in komodo, the only thing i cant find is how far the buffer is scrolled and that kind of stuff, but having a hard time to figure out how to get the position of the cursor.

Or does the cursor have a id so a can calulate it from there? with the DOM inspector i can’t go inside scintilla.

http://docs.komodoide.com/SDK/api/commonjs/editor#editor_functions_getcursorwindowposition

Because Scintilla is a plugin and it doesn’t have any DOM things inside.

@Defman :thumbsup: thanks, you made my day, that was exactly what i was searching for.

Fwiw if you want to do this yourself you could use a tooltip element to show a floating box much like you would use an absolute positioned div in HTML.

Do not use XUL panels for floating elements, they are a “focus” nightmare.

@nathanr Thanks for the pointers.