Class LM_PopupMenu
Version added: before 9.5
The LM_PopupMenu class creates a popup menu widget on the screen. Clicking on this object will bring up the actual menu. To create a new popup menu widget, you would use the LM.GUI.PopupMenu method. See the example below:

SZ_MenuTest.OPTION1 = MOHO.MSG_BASE
SZ_MenuTest.OPTION2 = MOHO.MSG_BASE+1
SZ_MenuTest.OPTION3 = MOHO.MSG_BASE+2
function SZ_MenuTest:DoLayout(moho, layout)
self.menu = LM.GUI.Menu("My Menu")
self.popup = LM.GUI.PopupMenu(120, false)
self.popup:SetMenu(self.menu)
layout:AddChild(self.popup)
self.menu:AddItem("Option 1", 0, self.OPTION1)
self.menu:AddItem("Option 2", 0, self.OPTION2)
self.menu:AddItem("Option 3", 0, self.OPTION3)
end

The LM_Menu of 3 options is attached to the LM_PopupMenu widget
Methods of LM_PopupMenu:
Name | Returns | Description | Ver |
Menu Menu() | LM_Menu | Returns the menu object attached to the popup menu | < 9.5 |
SetMenu SetMenu(menu) | void | Use this function to attach a menu to the widget so that when the user clicks on it, the menu appears | < 9.5 |
Methods inherited from LM_BaseWidget:
Name | Returns | Description | Ver |
Redraw Redraw() | void | Call this function to force the widget to redraw itself | < 9.5 |
Methods inherited from LM_View:
Name | Returns | Description | Ver |
Enable Enable(enable) | void | Enables or disables a view object | < 9.5 |
Height Height() | int32 | Added in version 11 | 11.0 |
IsEnabled IsEnabled() | bool | Tells whether the view is currently enabled | < 9.5 |
IsMouseDragging IsMouseDragging(button) | bool | Added in version 11 | 11.0 |
SetCursor SetCursor(cursor) | void | Change the cursor | < 9.5 |
SetToolTip SetToolTip(tooltip) | void | Added in version 12 | 12.0 |
Width Width() | int32 | Added in version 11 | 11.0 |