Panel:onContext()event


This event is fired when the user has clicked on the Panel with the right mouse button.

Return value

The event returns no value.

Example

--! luart-extensions import ui -- create a fixed Panel local win = ui.Window("Panel:onContext() event sample", "fixed", 320, 200) -- create a Panel local panel = ui.Panel(win, 0, 0, 100, 100) panel.bgcolor = 0x00a0F0 panel:center() function panel:onContext() win:popup(ui.Menu("Item 1", "Item 2", "Item 3")) end win:status("Right click on the Panel") await win:showasync()