@@27 List box definition
This function is used to redefine a field as a list box. A list box can contain colored text and bar graphs. Refer to the following for further details.
In all installed panels the field text LBOX are used as a link between the @@ function and the field.
Disable action is executed when nothing is selected in the list box. This function is used to disable, for example, the
and buttons in the example given below.Double clicking in the list box will initiate a Special action.
If no selection is made, the color code for the list box is the same as the one for the background default screen.
Syntax
Field ID
Field text
For the most part, the field text definition is used for the following @@ functions to establish a connection between the function and the field: @@24 Button definition, @@27 Listbox definition and @@29 Static control definition.
Field number
The field number defines the position of the field in the panel. You can find the field number by counting from the left to the right and from top to bottom.
Control attributes
Control character | Description | Example |
---|---|---|
H | Horizontal scrollbar | @@27;LBOX;HTE;?2002;;;10;1000;0;;D4;D6;F2; |
N | No selection | @@27;LBOX;G1TN;?0;;;11;1000;0;;F99; |
M | Multiple selection | @@27;LBOX;G1MT;?0;;;11;1000;0;;F2; |
E | Extended selection | @@27;LBOX;HTE;?2002;;;10;1000;0;;D4;D6;F2; |
T | Table header visible | @@27;LBOX;HTE;?2002;;;10;1000;0;;D4;D6;F2; |
G (default) | Owner drawn text list box | @@27;LBOX;GHTE;?2002;;;10;1000;0;;D4;D6;F2 |
G0 | Standard list box | @@27;LBOX;G0HTE;?2002;;;10;1000;0;;D4;D6;F2; |
G1 | Owner drawn text and bar graphic list box | @@27;LBOX;G1T;?0;;;11;1000;0;;F2; |
Help number
Syntax: ?x
The "x" is the help ID in the IPF file and is an integer from 1 to 65535. If ? 0 is given, then the help ID is calculated with respect to the field.
The help number is reserved in this way:
Value | Reserved |
---|---|
1 <= x = 999 | Panel help |
1000 = x = 9999 | Component help |
10000 = x = 19999 | Field help (2 byte integer) |
20000 = x = 29999 | Field help (4 byte integer, real, date and time) |
30000 = x = 39999 | Field help (Characters) |
30001 = x = 65535 | General help |
Relative character position
This function defines a relative character position as it relates to a current character position. If no value is given, the character position is defined as the current character position.
Relative line position
This function defines the relative line position as it relates to the current line position. If no value is given the position is defined as the current line position.
Visible lines
This value defines the height measured in number of lines in the panel.
Maximum number of lines
This value defines the maximum number of lines allowed. This value is most often set to 1000 lines.
Visible characters
Integer > 0 and < 132. This defines the number of visible characters. If no value is given, then the length of the field defines the number of visible characters.
Color code
Color includes both the foreground and the background color. The color code is calculated by the using this formula:
Example
The number (7) represents a pale gray background with black text.
The number (0313) represents a dark cyan background with yellow text.
Color code table
Code | Color | Code | Color | |
---|---|---|---|---|
00 | Black | 10 | Dark red | |
01 | Red | 11 | Dark pink | |
02 | Dark green | 12 | Green | |
03 | Yellow | 13 | Dark cyan | |
04 | Blue | 14 | Brown | |
05 | Pink | 15 | White | |
06 | Cyan | 16 | Light green | |
07 | Pale gray | 17 | Pale green | |
08 | Dark gray | 18 | Default list box yellow | |
09 | Dark blue | 19 | Light yellow |
Value field
Shows the values/columns in the list box where the calculations is performed.
Disable section
Syntax: Dx, D+x, D-x
For Dx, "x" is a positive number interpreted as the absolute field number.
For D+x or D-x, "x" is a positive number interpreted as the relative field number to the current field.
Special action
- RETURN VALUE action
Syntax: FIELD REFERENCE; VALUE RETURNED
This action returns values to the field described by the field reference The control character in the field reference gives the field type.
- REXX call action
Syntax:
Cx
"x" is the REXX command number with a range from 1 to 99.
In the start-up CMD file, you can specify environment variables to define the REXX command file attached to the REXX command number, such as SET REXXC1 = C:\REXX\BACKUP.CMD. If no environment variables are defined, then the default REXX command file names are REXXC1.CMD, REXXC2.CMD, and REXXC99.CMD.
- FUNCTION KEY action
Syntax:
Fx
where "x" is defined as the function key number to be simulated. It can contain be one or more digits The action simulates the use of the key and is performed immediately such that the rest of the special function definition is skipped. F0 is treated as if the Enter (Return) key was pressed and F3 is treated as the Escape (Esc) key.
- PANEL action
Syntax:
Sx
"x" is a positive number, interpreted here as a panel number. Without returning to the calling program, the panel system handles the panel that is specified in the action as if a call was made to display the panel. You can divide one panel into other panels without changing the calling program.Note: The data arrays are the same for the whole series of panels. - TERMINATE WINDOW action
Syntax:
T
The window is terminated.
- DELAY action
Syntax:
Wx
Where "x" is a positive number interpreted as a delay in seconds.
The panel system waits the specified number of seconds before resuming.
Example
#20;1;-1;-2;-3;01;00;79;
@@28;SWT;3;80;100;17;200;Work_Center_Resources;
@@33;CRCREG00;
@@27;LBOX;HTE;?2002;;;10;1000;0;;D4;D6;F2;
@@24;\Open;0;7;?2003;;;PD;F2;
@@24;\Search;0;7;?0;;;P;F6;
@@24;\New;0;7;?0;;;P;F4;
@@24;\Delete;0;7;?0;;;P;F5;
@@24;\Print;0;7;?0;;;P;F9;
@@24;Cancel;0;7;?0;;;PNPF3;T;F3;
@@24;Help;0;7;?0;;;PH;
@@13;*101;4;*102;1;*103;22;*104;23;*105;21;$211;N;
__Machine_number_$1___________&____$\Search__&
_
$LBOX_______________________________________________________________________&
_
_
_
_
_
_
_
_
_
_
_
_
<$\Open____&>$\New...__&$\Delete__&$\Print...&_$Cancel___&_$Help_____&