Enabling Touch Screen Mode
Touch Screen support is built into Ignition. Turn it on through the Project Properties or scripting in the Designer.
- From the 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.
Note title Comm Read/Write
Make sure Comm Read/Write is enabled in Project Properties of the Designer.
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 Touch Screen icon will appear on top right corner of the project login screen. Click in any of the login fields to bring up the Touch Screen keyboard.
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:
if system.gui.isTouchscreenModeEnabled(): currentText = event.source.text newText = system.gui.showTouchscreenKeyboard(currentText)
See also: system.gui.setTouchscreenModeEnabled
To Change the Size of the Touch Screen Keyboard
You can control the size of the Touch Screen keyboard that is displayed in a Vision Client.
- In the Designer, go to Project Properties > Vision > User Interface.
- Change the percentage for the Touch Screen Keyboard Width property to anything you want.
- When you launch a Vision Client, the Touch Screen keyboard will be displayed in the default percentage of 75%. After you're logged into the client, the Touch Screen keyboard will be set at the value you entered into the Touch Screen Keyboard Width property field.
This The Touch Screen Keyboard Width setting controls both the alphanumeric keyboard and the numeric keypad.