EventMenu()

Syntax

MenuItem = EventMenu()
Description
After an event of the type #PB_Event_Menu (returned by WindowEvent() or WaitWindowEvent()), use this function to determine which menu item has been selected (return the #MenuItem number).

This function also checks the selected item of a toolbar created with CreateToolBar().

A toolBar event is like a menu event (as tools are shortcuts for menu items most of the time). So it's a good idea, if the toolbar buttons and the menu items have the same ID, then the same operation can be done on both without any additional code.

Supported OS

All

<- EventGadget() - Window Index - EventTimer() ->