State
- Last UpdatedOct 25, 2022
- 1 minute read
The State callback is called for tools below a context menu (where menu property IsContextMenu = True) before the menu is shown as follows:
define method .State(!args is ARRAY)
if (!args.size() gt 0) then
if (!args[0] eq 'Equi') then
!args[1] = 'Enabled'
endif
endif
endmethod
Here, !args[0] is a STRING input argument defining the context and !args[1] is a STRING returned by the callback to set the tool state which can be 'Enabled', 'Disabled', 'Hidden', 'Checked' or 'Unchecked' and can be combined as follows 'Enabled|Checked'.