M_ENABLE
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall M_ENABLE([D_ENTRY,] col_id, ent_name[, ...]) xcall M_ENABLE(D_LIST, col_id, list_name[, ...]) xcall M_ENABLE(D_COLUMN, col_id[, ...]) xcall M_ENABLE(D_SUB, sub_name, ent_name[, ...])
Arguments
D_ENTRY
(optional) Enables a menu entry on a placed menu column. (default)
D_LIST
Enables a list of menu entries on a placed menu column.
D_COLUMN
Enables a placed primary column.
D_SUB
Enables a submenu entry, pop-up menu entry, or entry in a submenu to a pop-up menu on a loaded menu column.
col_id
The ID of the column to be enabled or the column in which the entry or list is located. Col_id is returned by the M_LDCOL and MB_END subroutines. (n)
ent_name
The name of the entry to enable. Ent_name is an entry name from the .ENTRY script command or MB_ENTRY. (a)
list_name
The name of the list of entries to enable. List_name is a list name from the .LIST script command or MB_LIST. (a)
sub_name
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 enable. (a)
Discussion
M_ENABLE enables 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_ENABLE can have no more than nine arguments.
Note the following:
- Col_id must be the ID of a loaded and placed column. An unloaded column will cause a fatal Toolkit error.
- Sub_name must be a valid menu column name. (Sub_name can be the name of an unplaced column or an unloaded column created using MB_COLUMN with the D_NOLOAD option.)
- If you’re using D_SUB to enable a pop-up menu entry or a submenu to a pop-up menu, placing the column on the menu bar will cause the entry or submenu to be reset to its default state. An entry in a submenu to a pop-up menu, however, will remain enabled when the column that references the submenu is placed on the menu bar.
Examples
The first example enables the entry “gl” located in the column whose ID is stored in colid(i).
xcall m_enable(colid(i), "gl")
In the second example, the entries in the list sysmgr in the column stored in colid(i) are enabled.
xcall m_enable(D_LIST, colid(i), "sysmgr")
In the third example, the columns whose IDs are stored in col1and col2 are enabled.
xcall m_enable(D_COLUMN, col1, col2)
In the last example, the submenu entry “o_owner” is enabled in the submenu named “admin.”
xcall m_enable(D_SUB, "admin", "o_owner")