
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_gettext()
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
C_GETTEXT()
DESCRIPTION
C_GETTEXT() allows data input and editing of a character string,
controlling all navigational keys. The length of the input area
can be specified and the string can be scrolled left and right in
the input area.
SYNTAX
C_GETTEXT(row, col, string [,color] [,scroll_len])
PARAMETERS
row (N) is the starting row for the input area.
col (N) is the starting column for the input area.
string (C) is the character string variable to place the data
entered by the user. If string contains data, the data will be
displayed on the screen and the user can edit the data. If string
contains spaces, an empty block will be displayed using the color
variable, if specified.
color (C/N) is the color to display for the input area and
character colors. The color argument can be specified as either a
dBASE/Clipper color string or numeric color code (see Appendix E).
If color is not specified, the default color of black on white is used.
scroll_len (N) is the width of the input area if the character
string is too long to fit in the desired input area. If scroll_len
is specified, the contents of string that can not fit in the input
area will not be displayed. However, C_GETTEXT() allows the
character string to be scrolled left and right, using the arrow
keys, to provide a method of editing a long string.
The following are the keys controlled by C_GETTEXT() and their
actions:
KEY ACTION
--- ------
ENTER Exit, return 13
ESC Exit, return 27
HOME Move cursor to first character
END Move cursor to last character
PGUP Exit, return 273
PGDN Exit, return 281
UP-ARROW Exit, return 272
DN-ARROW Exit, return 280
RT-ARROW Move cursor right one character
LT-ARROW Move cursor left one character
CTRL-RT-ARROW Move cursor right one word
CTRL-LT-ARROW Move cursor left one word
SPACE Space over/move right one character (unless INS mode)
BACKSPACE Space over and move left one character
INSERT Toggle INS (insert) mode on and off
DELETE Delete character where cursor is positioned
FUNCTION KEYS Exit, return key code for function key pressed
RETURNS
C_GETTEXT() returns the last key pressed to exit the function as a
C_KEYCODE() value. (Refer to Appendix B for a complete list of
C_KEYCODE() values.)
Note that the data entry string, and any modifications made by the
user, are accessed by the same variable name originally passed to
the function by the string argument.
EXAMPLES
str1 = space(25)
&& Display a 25 character data entry area
key = c_gettext(10,1,str1,"W/R")
...
...
&& Display a 35 character data entry area and let the rest
&& of str1 scroll left and right in area
str1 = space(150)
ans = c_gettext(5,0,str1,"W+/B",35)
...
...
&& Display a 15 character data entry area and let str1 be;
&& edited. The rest of str1 will scroll left and right
str1 = "Allow this string to be updated" + space(9)
key = c_gettext(10,1,str1,31,15)
See Also: C_PROMPT() C_QINPUT()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson