PureBasic - Menu

Overview

Creating and managing menus in PureBasic is simple. You can, of course, tailor the menus to your specific needs.

To use a menu you must first start by creating one with either CreateMenu() for normal menus, or CreatePopupMenu() for pop-up menus.

Mac OSX:
There are predefined menu events #PB_Menu_Quit, #PB_Menu_About and #PB_Menu_Preferences to represent the entries in the application menu which is present on every OSX program. Their values are negative to not conflict with any menu entries defined in the program. They are reported from EventMenu() as regular menu events.

Command Index

BindMenuEvent
CloseSubMenu
CreateImageMenu
CreateMenu
CreatePopupImageMenu
CreatePopupMenu
DisableMenuItem
DisplayPopupMenu
FreeMenu
GetMenuItemState
GetMenuItemText
GetMenuTitleText
HideMenu
IsMenu
MenuBar
MenuHeight
MenuID
MenuItem
MenuTitle
OpenSubMenu
SetMenuItemState
SetMenuItemText
SetMenuTitleText
UnbindMenuEvent

Example

Menu.pb
PopupMenu.pb

Supported OS

All

Reference Manual - Index