Class Reference
More examples
Contextual menus on PhotonUI widgets are automatically managed:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| var popup = new photonui.PopupMenu({ children: [ new photonui.MenuItem({ text: "Menu Item 1", icon: new photonui.FAIcon("fa-paper-plane"), callbacks: { click: function(widget, event) { alert("You clicked on me!"); } } }), new photonui.MenuItem({ text: "Menu Item 2", icon: new photonui.FAIcon("fa-gears") }), new photonui.MenuItem({ text: "Menu Item 3", icon: new photonui.FAIcon("fa-paw") }) ] }); var button = new photonui.Button({ text: "Right click on me!", buttonColor: "blue", contextMenu: popup }); photonui.domInsert(button, "demo");
|