CmdKeys
Contents |
Action
draw a row of keys.
Syntax
CmdKeys x, y, w ,h, font, options, char
Remarks
x |
x-coordinate of keys top-left, in pixels |
y |
y-coordinate of keys top-left, in pixels |
w |
The width of the keys |
h |
The height of the keys |
font |
Bitmap handle to specify the font used in key label. The valid range is from 0 to 31 |
options |
By default the keys are drawn with a 3D effect and the value of option is zero. OPT_FLAT removes the 3D effect. If OPT_CENTER is given the keys are drawn at minimum size centered within the w x h rectangle. Otherwise the keys are expanded so that they completely fill the available space. If an ASCII code is specified, that key is drawn 'pressed' - i.e. in background color with any 3D effect removed. |
char |
Key labels, one character per key. The TAG value is set to the ASCII value of each key, so that key presses can be detected using the REG_TOUCH_TAG register. |
The gap between keys is 3 pixels.
For OPT_CENTERX case, the keys are (font width + 1.5) pixels wide ,otherwise keys are sized to fill available width.
Example
' Pseudocode ' A row of keys CmdKeys 10, 10, 140, 30, 26, 0, "12345"