12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- .. _func_maxgui_popupwindowmenu:
- ===============
- PopupWindowMenu
- ===============
- PopupWindowMenu -
- Description
- ===========
- .. code-block:: blitzmax
- PopupWindowMenu( window:TGadget,menu:TGadget,extra:Object=Null )
- Display a popup menu.
- A drop-down menu is displayed on the screen below the user's current mouse position.
- See Also: #CreateMenu
- Parameters
- ==========
- Return Values
- =============
- Nothing.
- Examples
- ========
- .. code-block:: blitzmax
- Strict
-
- Import MaxGui.Drivers
-
- Local menu:TGadget
- Local window:TGadget
- Local panel:TGadget
-
- menu=CreateMenu("popup",0,Null)
- CreateMenu("Load",101,menu)
- CreateMenu("Save",102,menu)
-
- window=CreateWindow("Test PopupWindowMenu",20,20,200,200)
-
- ' create a panel to capture some mouse events
-
- panel=CreatePanel(0,0,ClientWidth(window),ClientHeight(window),window,PANEL_ACTIVE)
-
- While True
- WaitEvent
- Select EventID()
- Case EVENT_MOUSEDOWN
- If EventData()=2 PopupWindowMenu window,menu
- Case EVENT_WINDOWCLOSE
- End
- Case EVENT_MENUACTION
- Print "EVENT_MENUACTION: eventdata()="+EventData()
- End Select
- Wend
- See Also
- ========
|