table view
Support Library
This function displays a table on the console and provides a set of navigation features to browse the contents.
A set of characters (incl. function and navigation keys) can be defined to leave the viewer when such a character has
been pressed.
While viewing the table, following navigation keys are available:
Key | Function |
---|---|
↑ | Move up |
↓ | Move down |
← | Move left |
→ | Move right |
Pg up | 1 screen page up |
Pg dn | 1 screen page down |
Home | Move to 1st column |
End | Move to last column |
Ctrl-Home | Move to 1st row |
Ctrl-End | Move to last row |
Ctrl-↑ | Reduce number of screen lines to display contents |
Ctrl-↓ | Increase number of screen lines to display contents |
Ctrl-← | Reduce column width |
Ctrl-→ | Increase column width |
Ctrl-C | Copy cell contents into clipboard (Pushing Ctrl-C twice in a row stops program execution) |
F1 | Quick on-screen help for the available navigation functions |
F4 | Sort (push F4 on same column again to sort in opposite direction), if allowed |
Contents visualized with highlighted (typically yellow) text color are incomplete. Widen the columns and/or increase the number of rows to see the full contents if needed. One the entire contents are visible, then the highlighting vanishes.
Under normal conditions, the 'Support Library' is loaded automatically, so no 'include(...)' call is needed.
Not suitable for batch processing
3-6
No. | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1. input |
string | Name of existing table The contents of this table will be displayed | ||||||||||||||||||
2. input |
string | Prompt The prompt text will be displayed at the bottom of the table. UNICODE PUA2 characters (like &yellow; for yellow texdt) are allowed here to add visual effects.
| ||||||||||||||||||
3. input |
string | Return characters This string contains all return characters which will stop viewing when one of these characters or keyboard codes have been pressed.
Example: 'ABC&f3;&shift-f4;&escape;' + new line will stop browsing when A, B, C, F3, Shift-F4, the Enter key or the Escape key has been pressed.
| ||||||||||||||||||
Opt. 4. input |
set | Options The parameters set may contain the following options.
Default value: {} (empty set) - No options specified | ||||||||||||||||||
Opt. 5. output |
numeral | Row The table row number where the cursor was located when leaving the table will be returned. | ||||||||||||||||||
Opt. 6. output |
numeral | Column The table column number where the cursor was located when leaving the table will be returned. The 1st column is column 0. In case the option 'full row cursor' is chosen, then the column number shown at the left hand side of the screen will be returned. |
Type | Description |
---|---|
string | Entered command The chosen character, as specified in the 3rd function parameter, will be returned. |