Open topic with navigation
WTSupported in traditional Synergy on Windows
state = %B_DISABLE(container_id, button_name)
xcall B_DISABLE(container_id, button_name)
On Windows, returns the previous state of the button: D_DISABLED, D_ENABLED, or D_INPUTONLY (enabled only within input; the default state). (^VAL)
On UNIX and OpenVMS, always returns false.
The ID of the window or tab set that contains the button to disable. (n)
The name of the button to disable. (a)
%B_DISABLE prevents a button from being enabled and, if the button is enabled, disables the button (which prevents the button from receiving focus). (Use %L_BUTTONSTATE to disable a button on a list.) By default, a button is enabled only when its window is being processed. (See .BUTTON for details and exceptions.) To restore this default behavior (which %B_DISABLE prevents), call %B_ENABLE with the input_only argument set to true.
If container_id is invalid or the window does not contain the specified button, an error occurs.
This routine has no effect on applications running on UNIX or OpenVMS or in Synergy .NET. It does, however, save button information on these platforms, so if the window is saved to a window library (by using U_SAVE) and later loaded from that library on a Windows platform in traditional Synergy, the button will be on the window (assuming ISAM-compatible platforms).
The following example disables the OK button in window wndid.
prev_state = %b_disable(wndid, "OK")