of_setEnabled

Description

Sets the enabled/disabled state of an item.

Syntax

of_setEnabled(Long item, Boolean switch)
of_setEnabled(String item, Boolean switch)

Parameter(s)

Name Type Description
item Long or String The name or index of button for which the enabled indicator is to be set. The name of the button is the name the programmer gave when of_addItem was called or when of_setText was last called. The name is the text displayed for a toolbar when display text is enabled. The index of the button is the same as the value returned when of_addItem was called
switch Boolean Indicates the state to which the item is to be set, TRUE = Enabled and FALSE = Disabled.

Return Value

Returns SUCCESS (1) if successful and FAILURE (-1) if en error occurs.

Usage

Enable/Disable is achieved by switching the transparency of the picture and/or text of the item between 100% (enabled) and 50% (disabled).

Examples

of_setEnabled('Save', FALSE)

See Also

Last edited Sep 24, 2016 at 2:07 PM by cjharris02892, version 7