Im wondering how Codesys is doing the mouse event capturing with their visualization button element?
If you add such a button without configuring any input configuration event (like OnMouseDown) or button state variable and then click on the button, the button changes to the visual pressed state and back if you release the button (so they must react to an OnMouseDown event). But how?
If I try to mimic this behavior with my custom button visualization element (like a basic rectangle) I need to use an input configuration event to change the color of the button (to make it look like the button was pressed on OnMouseDown event).
When I try to add this button via a Frame-Element to my main visualization page I'm unable to use an input configuration event on the Frame-Element because the input configuration event on the button element won't be evaluated anymore (it seems like you can't stack input fields, e.g. invisible input elements, onto each other). Hence the button is not shown pressed anymore.
How they do it?
Last edit: sturmghost 2024-08-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Im wondering how Codesys is doing the mouse event capturing with their visualization button element?
If you add such a button without configuring any input configuration event (like OnMouseDown) or button state variable and then click on the button, the button changes to the visual pressed state and back if you release the button (so they must react to an OnMouseDown event). But how?
If I try to mimic this behavior with my custom button visualization element (like a basic rectangle) I need to use an input configuration event to change the color of the button (to make it look like the button was pressed on OnMouseDown event).
When I try to add this button via a Frame-Element to my main visualization page I'm unable to use an input configuration event on the Frame-Element because the input configuration event on the button element won't be evaluated anymore (it seems like you can't stack input fields, e.g. invisible input elements, onto each other). Hence the button is not shown pressed anymore.
How they do it?
Last edit: sturmghost 2024-08-04