Method XbpMenuBar():enableItem() Foundation

Enables a menu item.

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

This method returns the value .T. (true) when the specified menu item is enabled, otherwise .F. (false) is returned.


The method :enableItem() enables a menu item after it has been temporarily "disabled". The method :isItemEnabled() is used to determine whether a menu item is currently enabled. After the :enableItem() method is executed, a menu item can be "disabled" again using the method :disableItem().

When a menu item is defined as separating line it cannot be selected and the :enableItem() 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 :enableItem().


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.