Being this the first time I work with touchscreens I just noticed that the keyboard is not shown when entering text on an input pop-up.
Both system.gui.inputBox
and javax.swing.JOptionPane.showInputDialog
fail to summon the soft keyboard.
Is it a bug or a “feature not [yet] implemented”?
Is it that my only option is to create a Popup Window for this scenario?
Thanks.
Are you enabling touchscreen mode?
system.gui.setTouchscreenModeEnabled(1)
Yes, it is enabled, but still doesn’t do it for either type of input pop-up.
This is probably not possible to do in Vision - which is why it’s not implemented.
The inputBox function (and showInputDialog
both open dialogs - which are modal windows that completely block the event loop in the background.
The touchscreen keyboard is also a modal dialog. There’s no way for Ignition to open a second modal while one is active - Java Swing explicitly disallows concurrent modal dialogs.
Fortunately the workaround I found was creating a Popup Window, as expected.
That way the window does display the touchscreen keyboard when an input component gets focus.
Thanks.
1 Like