Method XbpMenuBar():disableItem() Foundation

Disables a menu item.

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

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


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().


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.