[R] How to disable existing menus in tcltk?
jtuimala at csc.fi
Mon Jan 22 09:57:59 CET 2007
I've constructed a small menu-driven interface to a couple of R functions
using the possibilities offered by the tcltk package. When user runs some
specific analyses, I would then like to disable some of the menus (or menu
choises) that are not applicable after the performed analysis. I tried to
modify the state of an existing menu, but it seems that neither
tkconfigure nor tkentryconfigure contains the state as one of its options.
Here's a snip of the code. How could I disable, for example, the Edit
data menu choise after already creating the menu (I want it to be active
tkadd(editMenu, "command", label="Edit data", command=function() editData())
tkadd(editMenu, "command", label="Preferences", command=function() editPref())
tkadd(topMenu, "cascade", label="Edit", menu=editMenu)
More information about the R-help