This was a smaller project, in which we created a dynamic touchscreen setup for a system whose button count needed to vary based on an external system.
The reason I find this interesting, and worth posting, is that the current SIM documentation doesn’t really cover the extended (and better) function for this (SetISLTsKeyX), only the basic version of it (SetISLTSKey). It also involves a creative use of the key data type to store/pass parameters to subroutines.
Because the documentation is lacking, the Syntax for SetIslTsKeyX is:
SetIslTsKeyX row, column, height, width, font, key value, icon id, icon placement (“L”, “R”, “C”, “T”, “B” for Left, Right, Center, Top and Bottom), color combo, text to display
So for a red/white cancel button with no icon, you might use: SetIslTsKeyX 1, 1, 3, 5, 2, @KEY_CANCEL, 0, “L”, 2, “Cancel”
To call a subroutine, I used a key variable of type 1 with the parameter I wanted to pass ( key(1, x) which I could then call a sub with x as a parameter). The main issue with this approach is that certain values are reserved by Micros for certain functions (like Enter, Cancel, Arrow Keys and such). They’re all much higher values (typically 6-7 digits), so using the low range is considered safe. I’ve seen this approach used to create a keyboard, using the ASCII values of each letter as the key data.
Once all the keys are setup, just call DisplayISLTSKey to show them.
Recent Comments