Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall M_DISABLE([D_ENTRY,] col_id, ent_name[, ...]) xcall M_DISABLE(D_LIST, col_id, list_name[, ...]) xcall M_DISABLE(D_COLUMN, col_id[, ...]) xcall M_DISABLE(D_SUB, sub_name, ent_name[, ...])
(optional) Disables a menu entry on a placed menu column. (default)
Disables a list of menu entries on a placed menu column.
Disables a placed primary column.
Disables a submenu entry, pop‑up menu entry, or entry in a submenu to a pop‑up menu on a loaded menu column.
The ID of the column to be disabled or the column in which the entry or list is located. Col_id is returned by the M_LDCOL and MB_END subroutines. (n)
The name of the entry to disable. Ent_name is an entry name from the .ENTRY script command or MB_ENTRY. (a)
The name of the list of entries to disable. List_name is a list name from the .LIST script command or MB_LIST. (a)
The name of the submenu, pop‑up menu column, or submenu to a pop‑up menu that contains the menu entries or submenu columns to disable. (a)
M_DISABLE disables menu entries, lists of menu entries, menu columns or subcolumns, entries in pop‑up menu columns, or entries in submenus to pop‑up menu columns. It has the four forms listed above.
You can specify more than one ent_name or more than one list_name. You can also specify more than one col_id if the qualifier is D_COLUMN. But M_DISABLE can have no more than nine arguments.
Note the following:
While your application is running, if the user selects a disabled entry in a primary column or submenu column, or if the user selects a submenu column, M_PROCESS will stay active but will return to the menu bar. If the user selects a disabled pop‑up menu entry, M_PROCESS will no longer be active; control will return to the calling routine. In this case, g_select will be false and g_entnam will be blank.
On Windows, disabled menu entries can be highlighted, but the user will not be able to select them.
In the following example, the entries “ar” and “ap,” located in the column whose ID is stored in colid(i), are disabled.
xcall m_disable(colid(i), "ar", "ap")
In the next example, the entries in the list sysmgr in the column stored in colid(i) are disabled.
xcall m_disable(D_LIST, colid(i), "sysmgr")
In the following example, the column whose ID is stored in colid(i) is disabled.
xcall m_disable(D_COLUMN, colid(i))
In the following example, the submenu entry “o_owner” is disabled in the submenu named “admin.”
xcall m_disable(D_SUB, "admin", "o_owner")