Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall M_DEFCOL([default][, current])
(optional) The default new column number or menu entry. (a or n)
(optional) Returned with the current default column number or menu entry. (a or n)
M_DEFCOL specifies which menu column will be dropped down automatically or which menu entry will be enabled when the menu is processed. You should call M_DEFCOL immediately after loading the columns. If not called, the first menu column is dropped down by default.
This subroutine determines the number of the column that will be dropped down or the menu entry that will be activated when the user presses the “process‑menu” key or your program calls M_PROCESS with no arguments. (See Enabling the menu bar for available process‑menu keys.)
If numeric arguments are passed, a default column is dropped down when the menu is processed. If alpha arguments are passed, a default entry is selected when the menu is processed. You can set a default menu column or menu entry but not both; setting one disables the other. To set the default menu entry, simply pass the entry name in default.
To set the default column, use the number 1 for the leftmost column, and so on, up to the number 9 for the rightmost column. (Specifying 9 always references the rightmost column even if fewer than 9 columns are placed.) If you specify a default value of 0, no column will be dropped down automatically by M_PROCESS or the process‑menu key. If you specify 0, the quick‑select feature will be enabled for columns as well as menu entries. Specifying a default value of 0 has the same effect as setting the environment variable DTK_MENU_UP.
DTK_MENU_UP for disabling automatic drop‑down menus.
In the following example, the second column from the left is the default column that is dropped down when the menu is processed.