TEXTBOX
Access properties of the Text-box form control.
WebVue support - No. Returns an unsuccessful code if used in this context.
Mode |
Mnemonic |
Syntax |
1 | GETTEXT | 1 |
2 | SETTEXT | 2 |
3 | APPENDTEXT | 3 |
4 | GETSELECTEDTEXT | 1 |
5 | GETLINETEXT | 4 |
6 | GETLINECOUNT | 5 |
7 | CLEAR | 5 |
8 | COPY | 5 |
9 | CUT | 5 |
10 | PASTE | 5 |
11 | SETREADONLY | 6 |
12 | SETBACKCOLOR | 7 |
13 | SETTEXTCOLOR | 7 |
14 | GETTEXTLENGTH | 5 |
15 | SELECTTEXT | 8 |
16 |
INDEXOF | 9 |
17 | ENABLEEVENTS | 6 |
18 | REPLACE | 10 |
All syntaxes
Argument |
Meaning |
Window | The name of the window that contains the form control. Type STR. |
Branch | The branch (if any) of the window. Use "*" to indicate the current branch of the program. Type STR. |
Identity | The identity of the form control within the specified window. Type STR. |
Text | A text string. Type STR. |
Syntax 1
StrVal = TEXTBOX(Mode, Window, Branch, Identity);
Return type: STR.
Execution
Mode |
Mnemonic |
Action |
1 |
GETTEXT |
Returns all the text displayed in the text-box. |
4 | GETSELECTEDTEXT |
Returns all the text that is selected in the text-box. |
Syntax 2
LongVal = TEXTBOX(Mode, Window, Branch, Identity, Text);
Return type: LONG.
Execution
Mode |
Mnemonic |
Action |
2 |
SETTEXT |
Set the text in the text-box. |
Syntax 3
LongVal = TEXTBOX(Mode, Window, Branch, Identity, Text [, NewLine])
Return type: LONG.
Argument |
Meaning |
Newline |
Flag indicating how the text is to be appended. Optional. Default = 0. |
Execution
Mode |
Mnemonic |
Action |
3 |
APPEND |
Append the supplied text. |
Syntax 4
StrVal = TEXTBOX(Mode, Window, Branch, Identity, Line)
Return type: STR.
Argument |
Meaning |
Line |
1 based index of a line in the text-box. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
5 |
GETLINETEXT |
Return the text from the given line. |
Syntax 5
LongVal = TEXTBOX(Mode, Window, Branch, Identity)
Return type: LONG.
Execution
Mode |
Mnemonic |
Action |
6 |
GETLINECOUNT |
Returns the number of lines in the text-box |
7 | CLEAR |
Clear all text in the text-box. |
8 | COPY |
Copies the selected text in the text-box to the clipboard. |
9 | CUT |
Cuts the selected text from the text-box and pastes it in the clipboard. |
10 | PASTE |
Replaces the selected text in the text-box with the contents of the clipboard. |
14 | GETTEXTLENGTH |
Return the text length in the text-box. |
Syntax 6
LongVal = TEXTBOX(Mode, Window, Branch, Identity, Flag)
Return type: LONG.
Argument |
Meaning |
Flag |
Flag specifying the operation. Either 0 or 1. |
Execution
Mode |
Mnemonic |
Action |
11 |
SETREADONLY |
Set the read / write mode of the text-box according to the supplied flag. |
17 |
ENABLEEVENTS |
Enable or disable text-box events (text changes, key pressed) according to the supplied flag. |
Return: 1 if successful, else -1. |
Syntax 7
LongVal = TEXTBOX(Mode, Window, Branch, Identity, Red, Green, Blue)
Return type: LONG.
Argument |
Meaning |
Red, Green, Blue |
Color components in the range 0 to 255. For example, 0, 0, 255 is blue. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
12 |
SETBACKCOLOR |
Set the text-box background color. |
13 | SETTEXTCOLOR | Set the text-box text color. |
Return: 1 if successful, else -1. |
Syntax 8
LongVal = TEXTBOX(Mode, Window, Branch, Identity[, Start [, Length]])
Return type: LONG.
Argument |
Meaning |
Start |
Character Position with text of text-box. Type INTEGER. |
Length |
Number of characters. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
15 |
SELECTTEXT |
Select text in the text-box using the following criteria. |
Syntax 9
LongVal = TEXTBOX(Mode, Window, Branch, Identity, Substring [, Start])
Return type: LONG.
Argument |
Meaning |
SubString |
Character string. Type STR. |
Start |
Character Position with text of text-box. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
16 |
INDEXOF |
Returns the zero-based index of the first occurrence of the SubString in the text-box. The search starts at the Start position. If Start is omitted then the search starts at the beginning of the text. |
Syntax 10
LongVal = TEXTBOX(Mode, Window, Branch, Identity, OldString, NewString [, Start[, Length]])
Return type: LONG.
Argument |
Meaning |
OldString |
Character string. Type STR. |
NewString |
Character string. Type STR. |
Start |
Character position with text of text-box. Type INTEGER. |
Length |
The length of the text in which the search takes place. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
18 |
REPLACE |
Search the text for instances of OldString and replace it with NewString. The search starts at the Start position and continues until Start + Length is reached. If Start is omitted the search starts at position 0. If Length is omitted the search continues to the end of the text. |
Example
For an example, select the Example link above.