Enabling Touch Screen Mode
Touch Screen support is built into Ignition. Turn it on through the Project Properties or scripting.
- In the Designer, from Project Browser, click onthe Project Properties
The Project Properties window is displayed. icon, or from the menubar go to Project > Project Properties.
- Scroll down to Vision > General page, to see the Touch Screen options.
- Touch Screen Mode Enabled: By default, this is enabled, which means an operator can activate the mode on the startup screen. All Clients can operate in touch screen mode. When Touch Screen mode is enabled, clicking on numeric and text entry boxes will pop up on-screen keyboards that can be used for data entry. You can optionally set the width of any scrollbars (number of pixels wide/tall)
- Touch Screen Mode Active on Startup: This option sets the Clients to start up with the touch-screen mode active.
- Change the settings as desired then Click OK.
These settings are helpful for mixed-use projects, that is, those that are launched on both touch screen devices and traditional computers and laptops. Once Touch Screen Mode is enabled through Project Properties, the TouchScreen icon will appear on the project login screen.
Invoke the Touch Screen Keyboard with Scripting
To handle touch screen logic via scripting, the general pattern is to respond to a mouse event, popup up a keyboard, and then set the component's value to whatever was entered in the keyboard. For example, for a text field, you would write a script like this:
See also: system.gui.setTouchscreenModeEnabled