tkMenu {svWidgets}R Documentation

Conveniently manipulate Tk menus

Description

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()!

Usage

  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)  

Arguments

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?

Value

tkMenuAdd() return the handle to the newly created menu.

Author(s)

Philippe Grosjean

See Also

MenuNames

Examples

  ## Look at the extensive example in ?MenuNames

[Package svWidgets version 0.9-5 Index]