search for: tkconfigur

Displaying 20 results from an estimated 50 matches for "tkconfigur".

Did you mean: tkconfigure
2008 Mar 31
2
tkconfigure throws an error
...evel() tktitle(tt)<-"the title" heading<-tklabel(tt,text="Enter date as YYYY-MM-DD") l1<-tklabel(tt,text="Reporting date") b1=tkbutton(tt,text="Run") d.val<-tkentry(tt,width=12) tkgrid(heading,columnspan=2) tkgrid(l1,d.val) tkgrid(b1,columnspan=2) tkconfigure(b1,command=source("./src/f.imm2.R")) ######### and get inconsistent errors: 1. Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] invalid command name ".6.4". ## when the tkconfigure is entered from...
2008 Nov 03
1
possible tcltk event loop problem
...e")) .messages <- MessagesWindow() messagesXscroll <- ttkscrollbar(messagesFrame, orient="horizontal", command=function(...) tkxview(.messages, ...)) messagesYscroll <- ttkscrollbar(messagesFrame, command=function(...) tkyview(.messages, ...)) tkconfigure(.messages, xscrollcommand=function(...) tkset(messagesXscroll, ...)) tkconfigure(.messages, yscrollcommand=function(...) tkset(messagesYscroll, ...)) For the script window (note that "log" is a hold-over from earlier terminology): logFrame <- tkframe(CommanderWindow()) p...
2003 Aug 15
1
menubutton don´t work
...) arch<-tclVar(init=" ") archOp<-tclVar(init=" ") vectPath<-c() archivos<-function(){ f<-tkcmd("tk_getOpenFile") temparch<-tclvalue(f) assign("vectPath",c(vectPath,temparch),.GlobalEnv) cant<-length(vectPath) arch<-vectPath[cant] tkconfigure(mb,state="normal") tkadd(m, "radio", label=arch, variable="archOp", value=arch) tkconfigure(b2,state="normal") } ver<-function(n){ tabla<-read.table(n,header=TRUE,comment.char="@") nbre<-names(tabla) tabla } tt<-tktoplevel() b<-...
2008 Mar 19
1
Radio Buttons or similars
...e Radio Buttons. I would like that, if somebody know as I could return the value, you say me as do it. Next, I show the function function1<-function(){ require(tcltk) tt <- tktoplevel() rb1 <- tkradiobutton(tt) rb2 <- tkradiobutton(tt) rbValue <- tclVar("oranges") tkconfigure(rb1,variable=rbValue,value="apples") tkconfigure(rb2,variable=rbValue,value="oranges") tkgrid(tklabel(tt,text="Which do you prefer?")) tkgrid(tklabel(tt,text="Apples "),rb1) tkgrid(tklabel(tt,text="Oranges "),rb2) value<-0; aux_function&lt...
2001 Feb 22
2
Problem with tcltk listbox
...ot.listbox<-tklistbox(anzeigeframe,exportselection="0",selectmode="browse") prot.yscroll<-tkscrollbar(anzeigeframe) i <- 1 while (i <= length(resultset[,1])) { tkinsert(prot.listbox,'end',paste(resultset[i,1],resultset[i,2],sep=".")) i<- i+1 } tkconfigure(prot.listbox,yscrollcommand=paste(.Tk.ID(prot.yscroll),"set")) tkconfigure(prot.yscroll,command=paste(.Tk.ID(prot.listbox),"yview")) tkpack(prot.yscroll,prot.listbox,side="left",fill="y") tkbind(prot.listbox,"<Button-1>",function() { pr...
2007 May 30
5
determining a parent function name
...if(!length(msg)) msg <- "" if(require(tcltk, quiet = TRUE)) { tt <- tktoplevel() tkwm.title(tt, "Error") tkmsg <- tktext(tt, bg = "white") tkinsert(tkmsg, "end", sprintf("Error in %s: %s", "???", msg)) tkconfigure(tkmsg, state = "disabled", font = "Tahoma 12", width = 50, height = 3) tkpack(tkmsg, side = "bottom", fill = "y") } stop(msg) } But, I would like to know from which function error() is called. For example, if I have foo <- f...
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
...xt widget. This can be achieved by .Tk.ID(). Is there a way to avoid to call .Tk.ID --- perhaps by using tkyview? tk.test1 <- function(nmax=3){ library("tcltk") tl <- tktoplevel() tl.text <- tktext(tl) tl.yscroll <- tkscrollbar(tl) tkconfigure(tl.text, yscrollcommand=paste(.Tk.ID(tl.yscroll),"set" )) tkconfigure(tl.yscroll, command=paste(.Tk.ID(tl.text), "yview")) tkpack(tl.text, tl.yscroll, side="left", fill="y") tkpack(tkbutton(tl, text="exit", command=functio...
2010 Jun 11
1
Windows, OSX and Linux: updating a graphic device and double buffering
...ry(tcltk) tt <- tktoplevel() tkpack(top <- tkframe(tt), side = "top") SliderValue <- tclVar("50") SliderValueLabel <- tklabel(top,text=as.character(tclvalue(SliderValue))) tkpack(tklabel(top,text="Slider Value : "),SliderValueLabel, side = "left") tkconfigure(SliderValueLabel,textvariable=SliderValue) slider <- tkscale(tt, from=0, to=100, showvalue=F, variable=SliderValue, resolution=1, orient="horizontal", length = 200) tkpack(slider, side = "top") tkconfigure(slider, command=function(...){ state <- unlist(...) myPl...
2003 Nov 30
1
tcltk problem with <Button-2>
The following R code works as expected: require( tcltk ) tt <- tktoplevel() # create a button labelled A that changes to B when pressed pressed <- function() tkconfigure( tt.but, text="B" ) tt.but <- tkbutton( tt, text="A", command=pressed ) tkpack(tt.but) # if Control-Button-1 pressed change button label to C e <- expression( tkconfigure( tt.but, text="C" ), break ) tkbind(tt.but, "<Control-Button-1>", e ) But...
2010 Nov 19
1
Set colour in tcl variable
Hello all, using package tcltk this is my problem: I want to set a colour of a tclVar(). I have a tklabel (fixed in position) which should display two variables occasionally. If a constraint is fulfilled, the tklabel should display correct<-tclVar('correct') in green, otherwise it should display wrong<-tclVar('wrong') in red! To display the variables is no
2012 Nov 19
6
tcltk freezing using MS Windows for R-2.14+
...ils below. After considerable testing I have reduced the problem from a few thousand lines of code to 30 lines! If you paste the following lines of code into an R window: testGUI <- function(){ require(tcltk) MainWindow <- tktoplevel() topMenu <- tkmenu(MainWindow) tkconfigure(MainWindow,menu=topMenu) normalizeMenu <- tkmenu(topMenu, tearoff=FALSE) tkadd(normalizeMenu,"command",label="Normalize",command = function() NormalizeNow(MainWindow)) tkadd(topMenu, "cascade", label="MainWindow", menu = normalizeMenu)...
2009 Oct 19
1
Problem with geometry manager in TclTK
...ext="Input File Format", font="Times 15", foreground="dark red")) tkgrid(Title.frame) Choose.frame <- tkframe(ask.form, relief="groove", borderwidth=2) file.format1 <- tkradiobutton(Choose.frame) file.format2 <- tkradiobutton(Choose.frame) tkconfigure(file.format1, variable=file.format, value="1") tkconfigure(file.format2, variable=file.format, value="2") tkgrid(tklabel(Choose.frame, text="Format 1 "),file.format1) tkgrid(tklabel(Choose.frame, text="Format 2 "),file.format2) tkgrid(Choose.frame)...
2001 Sep 19
2
tcltk: Difficulties creating menus
I am struggling with adding menus to a tcltk application. The following example (from the O'Reilly book on Perl/Tk) works fine: #!/usr/bin/perl -w use Tk; my $mw = MainWindow->new; $menub = $mw->Menubutton(-text => "Color")->pack(); foreach (qw/red yellow green blue grey/) { $menub->radiobutton(-label => $_, -command => \&set_bg,
2005 Sep 05
1
tcltk, X11 protocol error: Bug?
...tk) clrRamp <- function(n.col, b.color=NULL,e.color=NULL){ B.ChangeColor <- function() { b.color <<- tclvalue(tkcmd("tk_chooseColor",initialcolor=e.color, title="Choose a color")) if (nchar(b.color)>0){ tkconfigure(canvas.b,bg=b.color) Rmp.Draw() } } E.ChangeColor <- function() { e.color <<- tclvalue(tkcmd("tk_chooseColor",initialcolor=e.color, title="Choose a color")) ##cat(e.color) if (nchar(e.color)&...
2003 Jul 30
1
Tktable White column when WIDTH>13
On Wed, 30 Jul 2003 TSudler at ch.imshealth.com wrote: <SNIP> table1 <- tkwidget(tt,"table",variable="tclArray", rows=as.character(dim(datifram)[1]+1), cols=as.character(dim(datifram)[2]),titlerows="1", titlecols="3",selectmode="extended",height="27",
2007 Jan 22
0
How to disable existing menus in tcltk?
...nctions 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=topMen...
2007 Jul 11
0
tkfocus issue
Dear All: I am stuck with this issue: I have a button on a TK window, once click it, it pops up a individual plot device: individual_plot <- function() { tkconfigure(overlay.button, state="normal") options(locatorBell = FALSE) plotfuntype() trellis.focus("panel", 1, 1,highlight=FALSE) panel.identify(labels=colnames(dataplot)) } Now I have another button, originally state="disabled", but activated by : tkconfig...
2006 Oct 23
1
R tcl/tk
...me.2 resides where it should in the toplevel frame. tkgrid(tklabel(frame.2, text="FACTOR column "), tkentry(frame.2, textvariable=FACTOR.column.value, width=2), sticky="e") This doesn't work because I don't know how to tell tcl that answer.button1 belongs in frame2: tkconfigure(answer.button1, variable=buttonValue, value="TRUE") tkgrid(tklabel(frame.2, text="Question? yes "), answer.button1, sticky="e") ^^^^^^^^^^^^^^^ I know this can not be as hard as I am making it. Thanks for the hel...
2008 May 07
1
Aling elmentos into Windows with TK
Hello!! I would like create a window that has diferent element as: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/checkboxes.html http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/radiobuttons.html I know as make it, but I don?t know as I could (align the diferent elemnts to left, right, top, bottom) or (put in a coordinates into windows). If anybody know as I could make it, I would
2009 Oct 12
0
tktext-window smaller than text
...ndow to just wrap the line, but to belong to scrollbar that is able to scroll to the end of the text. tt <- tktoplevel() txt <- tktext(tt, width=100, height=30) scrergVert <- tkscrollbar(tt, orient = "vertical", repeatinterval = 1, command = function(...) tkyview(txt, ...)) tkconfigure(txt, yscrollcommand = function(...) tkset(scrergVert, ...)) scrergHor <- tkscrollbar(tt, orient = "horizontal", repeatinterval = 1, command = function(...) tkxview(txt, ...)) tkconfigure(txt, xscrollcommand = function(...) tkset(scrergHor, ...)) tkgrid(txt, column=0, row=0, sticky=...