When you configure the command to open a dialog box, you can specify X and Y position.
So the simplest solution is to set X and Y position of the dialog box for each command button.
There are some examples of mouse position management in the CODESYS store ("Visualization Elements" for example). You can therefore obtain the position of the mouse and calculate the display position of the dialog box.
BR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have been investigation how to implement a open dialog at specific position in screen, depending on the clicked element size and position.
Is there a way to grab the position and size of the element we click on, then pass this into a function to calculate where to open the pop up?
Last edit: paulolouro 2020-10-24
Hi,
When you configure the command to open a dialog box, you can specify X and Y position.
So the simplest solution is to set X and Y position of the dialog box for each command button.
There are some examples of mouse position management in the CODESYS store ("Visualization Elements" for example). You can therefore obtain the position of the mouse and calculate the display position of the dialog box.
BR