How Can We Help?
How to Create a Toggle Button
Purpose of this article
This article aims to show you how to create a toggle button.
A toggle button can be used to toggle the value of a tag from “True” to “False” or “False” to “True”.
There are two ways to create a toggle button, directly in the Toggle property of a Button object or by script.
Below, both ways will be shown.
Creating Toggle button by property
- Insert a button object on the screen, in the button properties list, expand the “Toogle Button” property and then enable the “Is Toggle Button” option and in the “Tag” field enter the tag in which the value will be toggled.
Creating Toggle button by script
- Insert a button object on the screen, and with the button selected, open the script area. In the MouseUp event, insert the script shown below, replacing it with your tag name.