%L_BUTTONSTATE
Enable or disable a button on a list
WSupported on Windows
|
|
|
|
prev_state = %L_BUTTONSTATE(list_id, name[, new_state])
or
xcall L_BUTTONSTATE(list_id, name[, new_state])
Return value
prev_state
On Windows, returns the previous state of the button: D_DISABLED, D_ENABLED, D_INPUTONLY (enabled only within input). (^VAL)
On Unix, returns the previously specified state (though it has no meaning on Unix platforms). On OpenVMS, returns true.
Arguments
list_id
The ID of the list. (n)
name
The name of the button. (a)
new_state
(optional) One of the following: D_DISABLED, D_ENABLED, D_INPUTONLY (enabled only within input). (n)
Discussion
L_BUTTONSTATE enables or disables a button within a list.
If new_state is not specified, the previous state remains unchanged.
You can XCALL this function if you don’t need to know the previous state of the button.
If a button is enabled and the user clicks on it while not in a Toolkit input processing routine, one of two things occurs. Either the click is ignored, or the event will be signaled at the invocation of the next Toolkit input processing routine, depending upon timing. To ensure that the button cannot be pressed when input is not being done to the list, set new_state to D_INPUTONLY. |
On Unix and OpenVMS, this routine is ignored.
See also
Using the button routines for general information on buttons and button sets on windows, tab sets, and lists
Examples
The following example enables the I_OK button whenever we’re performing input on the list.
xcall l_buttonstate(listid, I_OK, D_INPUTONLY)