.SELECT
Begin a selection window definition
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
.SELECT name, [rows], [column_width][, NOPAD]
Arguments
name
The name of the selection window (a maximum of 15 characters).
rows
(optional) The number of rows for the selection window.
column_width
(optional) The width of each column of the selection window.
NOPAD
(optional) Suppress the blank columns that occur to the left and right of each entry in the selection window.
Discussion
The .SELECT command defines the name and size of a selection window, and marks the beginning of a selection window definition.
Name must be unique within the set of windows in the library. You can use name in the SELWND qualifier of the .FIELD command to attach the selection window to an input field. You can also pass name to the U_LDWND subroutine to load the window directly.
If rows is not specified or is zero (0), UI Toolkit uses the total number of entries. However, if the window contains more than 20 entries, the entries are evenly divided into as many columns as are required to use 20 rows or less.
If column_width is not specified, UI Toolkit uses the width of the widest entry. Note that this width does not include the leading and trailing blanks, which are always added to each entry (unless NOPAD is specified).
If either rows or column_width is not specified and you are using the NOPAD qualifier, you must use the appropriate comma placeholder for the missing qualifier.
A selection window must contain at least one item and may not contain more than 32767. (Note, however, that because Synergy cannot place windows that do not fit on the screen, the practical maximum number of entries will be much lower. For instance, if the size of the Toolkit’s virtual screen is 25 rows by 80 columns, a selection window cannot be placed if it has more than 2000 entries—and 2000 would only be possible if there is no padding between the columns and each entry is a single character.)
See also
.ITEM script command for more information about defining selection window items
Examples
This example creates a two-item selection window with a vertical format, as follows:
.select yesorno .item "yes" .item "no" .end
Changing the .SELECT command to
.select yesorno, 1, 10
creates the same selection window with a horizontal layout, as follows:
Each selection item in this example occupies 10 spaces and is displayed in its own column.