# NOT RUN {
a <- rp.control()
# The action function has to come first so that it already exists for rp.menu,
# as it creates the callback functions on the fly it requires action to already
# be defined.
domenu <- function(panel) {
rp.messagebox(panel$menuchoice, title = "You chose")
panel
}
rp.menu(a, menuchoice, labels=list(list("File","Quit"),
list("Edit","Copy","Cut","Paste")), action=domenu)
# }
Run the code above in your browser using DataLab