GUIKit`
GUIKit`
"PopupMenu"
The functionality provided by GUIKit has been superseded by the interface construction and controls functions native to the built-in Wolfram Language.
Widget["PopupMenu"]
represents a popup menu.
Examples
Basic Examples (1)
Needs["GUIKit`"]ref = GUIRun[
Widget["Frame", {
Widget["TextArea", {"columns" -> 30, "rows" -> 5}, Name -> "messageArea"],
Widget["PopupMenu", {
Widget["MenuItem", {"text" -> "Item 1"}],
Widget["MenuItem", {"text" -> "Item 2"}],
Widget["MenuSeparator"],
Widget["MenuItem", {"text" -> "Item 3"}]
}, Name -> "popupMenu"],
BindEvent[{"messageArea", "mousePressed"},
Script[
If[TrueQ[PropertyValue[{"#", "popupTrigger"}]],
InvokeMethod[{"popupMenu", "show"}, PropertyValue[{"#", "component"}], PropertyValue[{"#", "x"}], PropertyValue[{"#", "y"}]]];
]],
BindEvent[{"messageArea", "mouseReleased"},
Script[
If[TrueQ[PropertyValue[{"#", "popupTrigger"}]], InvokeMethod[{"popupMenu", "show"}, PropertyValue[{"#", "component"}], PropertyValue[{"#", "x"}], PropertyValue[{"#", "y"}]]];
]]
}]
];GUIScreenShot[ref]