S_SELDFLT
Set or return default entry for a selection window
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall S_SELDFLT(window_id, [new_default] [, current_default])
Arguments
window_id
The ID of a loaded selection window. (n)
new_default
(optional) The item number of a new default entry. (n)
current_default
(optional) The returned item number of the current default entry (that is, the entry that was the default when S_SELDFLT was called). (n)
Discussion
S_SELDFLT sets the default entry for a selection window or a set of radio buttons or returns the last default set with S_SELDFLT. This subroutine does not affect check box selection windows.
Selection items are numbered from top to bottom and from left to right. (Text and line entries are not numbered as items.)
Note the following:
- If new_default is not passed, is less than 1, or is greater than the number of items in the selection window, S_SELDFLT will not set a default.
- A default set with S_SELDFLT will override defaults specified with the DEFAULT option for .ITEM and the default_entry argument for S_SELBLD.
- If an input field is associated with selection window, and that field has a default (set with DEFAULT for .FIELD or D_FLD_DFLT for IB_FIELD), that default will override a default set with new_default.
The current_default argument is returned with the last default set with S_SELDFLT. If no default has been set with S_SELDFLT, current_default is returned with a value of 1. Note that S_SELDFLT does not return defaults set by the DEFAULT option for .ITEM, the default_entry argument for S_SELBLD, the DEFAULT option for .FIELD, or the D_FLD_DFLT qualifier for IB_FIELD.
Examples
The first S_SELDFLT call in the following example changes the default selection to Bill—assuming that selid is the selection window ID for the following selection window. (See S_SELBLD Examples for the code to create this selection window.)
The second S_SELDFLT call retrieves the item number for the current default (which is 4) set with S_SELDFLT. Note that because new_default hasn’t been passed in the second call, it doesn’t change the default.
record selid ,i4 default_entry ,i4 proc . . . xcall s_seldflt(selid, 4) . . . xcall s_seldflt(selid,, default_entry) . . .