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

  • paulolouro

    paulolouro - 2020-10-24


    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 - 2020-10-26


    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.



Log in to post a comment.