tkMenu {svWidgets} | R Documentation |
These functions provide an easier way to create and manipulate Tk menus under R. Note that the corresponding MenuXXX() function also manipulate Tk menus the same way, but are capable of manipulating other menus as well. One should, thus, preferably use MenuXXX() that tkMenuXXX()!
tkMenuAdd(menu, tearoff = FALSE) tkMenuAddItem(menu, item, action, image = "", accel = "", options = "") tkMenuDel(menu) tkMenuDelItem(menu, item) tkMenuItems(menu) tkMenuChangeItem(menu, item, action = "", options = "") tkMenuStateItem(menu, item, active = TRUE) tkMenuInvoke(menu, item)
menu |
Name of a menu |
tearoff |
Should the menu be detachable? |
item |
Name of a menu item |
action |
Action the menu triggers (R code) |
image |
Name of an image to display at left of the menu item |
accel |
Accelerator (keystroke) to use to trigger this menu item |
options |
Additional options, for instance 'state = "disable"' to disable the menu at creation. |
active |
Do we enable or disable the menu item? |
tkMenuAdd()
return the handle to the newly created menu.
Philippe Grosjean
## Look at the extensive example in ?MenuNames