play below after your code and look at tk window: tkentryconfigure(editMenu,0,state="disable") tkentryconfigure(editMenu,0,state="active")
tkentryconfigure(topMenu,1,state="disable") tkentryconfigure(topMenu,1,state="active") HTH On 1/22/07, Jarno Tuimala <[EMAIL PROTECTED]> wrote: > Hi! > > 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 > initially)? > > gui<-tktoplevel() > topMenu<-tkmenu(gui) > tkconfigure(gui,menu=topMenu) > editMenu<-tkmenu(topMenu, tearoff=FALSE) > tkadd(editMenu, "command", label="Edit data", command=function() editData()) > tkadd(editMenu, "command", label="Preferences", command=function() > editPref()) > tkadd(topMenu, "cascade", label="Edit", menu=editMenu) > > Thanks, > Jarno Tuimala > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.