Get Visu button position and size to open dialog via script depending on button location in screen

paulolouro
2020-10-24
2020-10-26
  • paulolouro - 2020-10-24

    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
  • JAPIB

    JAPIB - 2020-10-26

    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

     

Log in to post a comment.