I need to create a button in the TwinCAT HMI 3 toolbar that, when clicked, will take me to the top or bottom of the current content, such as Page1, without having to scroll. Does anyone have any ideas?
I used several factions but it didn’t work. I don’t know what function is supported in TwinCAT3 HMI software.
2
Answers
Place a button in the graphic environment of TwinCAT HMI software, and then click on the OnPressed option in its Event tab and put the following Java code in it. Now, if you put the name of the page you are on and expect to jump to the top of that page instead of the phrase Page1, your code will work correctly.
To scroll to the bottom of the page, you need to use the following code
document.getElementById("Page1").scrollIntoView(false);