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])



The ID of a loaded selection window. (n)


(optional) The item number of a new default entry. (n)


(optional) The returned item number of the current default entry (that is, the entry that was the default when S_SELDFLT was called). (n)


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:

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.


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.)

Example 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.

    selid          ,i4
    default_entry  ,i4
xcall s_seldflt(selid, 4)
xcall s_seldflt(selid,, default_entry)