Message Boards Message Boards

0
|
2612 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

CreateDialog at cursor position (not MousePosition[])

I want to mimic the dialog that is uses for autocompletion when you type code in the front end. One of the main difficulties is to open a dialog directly under the cursor position as it is done by the front end

enter image description here

Simple example is

CreateDialog[Style["Empty Box", 30, Red],
  WindowFrame -> "Frameless", 
  WindowMargins -> Automatic]

Now you can use WindowMargins to put the dialog everywhere you like on the screen but I see no direct way to extract the current cursor position.

Does someone know how the front end achieves this for autocompletion or how one can mimic this?

Cheers Patrick

Btw, there is a strongly related question of mine on Stack Exchange.

POSTED BY: Patrick Scheibe
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract