LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow('NORMAL')
again:
DO FOREVER
guigetmsg()
CATCH SYNTAX
CONDITION('M')
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
END
RETURN
wm_contextmenu:
IF guiwindow == ARG(1) THEN
guiaddmenu("Window")
ELSE DO
variable = guiinfo("VARIABLE", ARG(1))
SELECT variable
WHEN "MYBUTTON" THEN guiaddmenu("Button")
WHEN "MYLIST" THEN guiaddmenu("List")
OTHERWISE RETURN ""
END
END
RETURN ""
windowitem1:
guisay('"Window -> Item 1" was selected')
RETURN
windowitem2subitem1:
guisay('"Window -> Item 2 -> Sub Item 1" was selected')
RETURN
windowitem2subitem2:
guisay('"Window -> Item 2 -> Sub Item 2" was selected')
RETURN
buttonitem1:
guisay('"Button -> Item 1" was selected')
RETURN
buttonitem2:
guisay('"Button -> Item 2" was selected')
RETURN
listitem1:
guisay('"List -> Item 1" was selected')
RETURN
listitem2:
guisay('"List -> Item 2" was selected')
RETURN |