I've create a visu with a single checkbox, associated with an interface variable
TestClickFrame_VISUVAR_IN_OUT TestVar: BOOL; //referenced by the "Variable" property of the checkbox in the visuEND_VAR
I then create another visu, "TestClick_VISU", which contains a single frame, referenced to TestClickFrame_VISU
On that frame, I assign the "OnMouseClick" Input, which is configured to execute the following code:
Test_PRG.TestVar2:= Test_PRG.TestVar2 + 1;
The OnMouseClick event of the frame works, I can see the variable counting up.
However, the checkbox variable doesn't work
I would expect to see a click event transfer through to underlying frames. Is it supposed to work that way? I can't find any information about this.
The same happens with an invisible input object. The click event is only handled on the invisible input, but any elements below it are not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah I understand that, but some visu elements don't have the OnMouseClick input. Checkboxes and Combo Boxes, for example. So in the example, I want to more than just check the box on a Checkbox element, I also want to set a variable.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've create a visu with a single checkbox, associated with an interface variable
I then create another visu, "TestClick_VISU", which contains a single frame, referenced to TestClickFrame_VISU
On that frame, I assign the "OnMouseClick" Input, which is configured to execute the following code:
Test_PRG.TestVar2:= Test_PRG.TestVar2 + 1;
The OnMouseClick event of the frame works, I can see the variable counting up.
However, the checkbox variable doesn't work
I would expect to see a click event transfer through to underlying frames. Is it supposed to work that way? I can't find any information about this.
The same happens with an invisible input object. The click event is only handled on the invisible input, but any elements below it are not.
The easiest thing you can do is to add a code to ""OnMouseClick"" input:
TestVar:= NOT TestVar;
Other option is to bind TestVar to ""Input configuration / Toggle / Variable""
Yeah I understand that, but some visu elements don't have the OnMouseClick input. Checkboxes and Combo Boxes, for example. So in the example, I want to more than just check the box on a Checkbox element, I also want to set a variable.