
Chapter 7. I/O Facilities
119
7.5.3 User-Defined Touch Keys
You may define touch keys in arbitrary areas on the touch screen.
You may operate those touch keys by:
- Pressing them
[ 1 ] Creating a user-defined touch key with
"CONSOLE.
FN3"
To create a user-defined touch key, specify the area of a touch key and a character(s) to be
displayed on the touch key, by using the extended function
"CONSOLE.FN3."
The area of a touch key can be specified with two diagonal points, "initial coordinates" and
"final coordinates."
Given below is a sample program which defines a key numbered 501 in the area specified with
initial coordinates (20, 50) and final coordinates (180, 100) and displays the character string
"ABCDE" in standard-size font in ANK quadruple.
DIM RECT%(3)
KEYNO%=501
’User-defined touch key numbered 501
KEYDATA$="U1"
’Key data="U1"
RECT%(0)=20:RECT%(1)=50
’Initial coordinates (20,50)
RECT%(2)=180:RECT%(3)=100
’Final coordinates (180,100)
DSPDATA$="ABCDE"
’Display "ABCDE"
FONT%=.cnANK
’Use standard-size font in ANK mode
ATTRIB%=.cnW2H2
’In quadruple size
CALL"CONSOLE.FN3" .fcUKey KEYNO%,KEYDATA$,RECT%(),DSPDATA$,
FONT%,ATTRIB%
- User-defined touch keys may be assigned #501 through #550.
- You may assign a desired character string (up to two characters) or a single control code to a
user-defined touch key.
(180,100)
(20,50)
Final coordinates
Initial coordinates
ABCDE
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...