Message XbpMenuBar():xbeP_ItemSelected Foundation

Menu item has been activated

:itemSelected := {| nItemIndex, uNIL, self | ... }
:itemSelected ( <nItemIndex> ) --> self
<nItemIndex> is a numeric value indicating the ordinal position of the selected menu item within the menu.

This method returns the object executing the method (self).


The xbeP_ItemSelected event is generated when a menu item in a menu has been selected. This occurs after the user clicks the left mouse button on the menu item, presses the Return key when the item is highlighted, or presses the shortcut key combination. This event is only generated if the selected menu item does not contain a code block. If it does not contain a code block, the callback code block or method of the menu object is executed. The first parameter <nItemIndex> contains the ordinal position of the selected menu item.

If an action code block is defined for the menu item, the event xbeP_ItemSelected is not generated. Instead of the callback code block or the callback method, the action code block specified when the menu item was defined (in the parameter passed to :addItem(), :insItem(), or :setItem()) is executed. The parameters passed to the action code block are the same as those that would be passed to the callback code block :itemSelected.


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.