Classes

Method XbpMenuBar():disableItem() Foundation

Disables a menu item.

Syntax
:disableItem( <nItemIndex> ) --> lSuccess
Parameters
<nItemIndex>
<nItemIndex> is a numeric value specifying the ordinal position within the menu of the menu item that is disabled.
Return

The method returns the value .T. (true) if the specified menu item is disabled, otherwise it returns .F. (false).

Description

The :disableItem() method temporarily marks a menu item as "disabled" (or unavailable) at runtime. Whether a particular menu item is currently disabled is determined using the :isItemEnabled()method. After the :disableItem() method is used to disable a menu item, it can be enabled (made available) using the method :enableItem().

When a menu item is defined as separating line it cannot be selected and the :disableItem() method is ignored. Separators are valid menu items and do have an ordinal position within a menu. The position of separators must be considered when calling :disableItem().

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.