search for: tkinsert

Displaying 20 results from an estimated 33 matches for "tkinsert".

2006 Aug 11
2
tkinsert
Dear List, I'm looking for some informations about the function "tkinsert()". I d'like to write lot of command in my text window and after to evaluate it with a button "Submit" for example, but i have some problems: here a exemple of my code: 1) My first problem tt=tktoplevel() txt=tktext(tt,height=40) tkpack(txt) var1=paste("x=2") tkinse...
2003 Sep 25
1
tkinsert (PR#4289)
In R-1.7.1, I used to be able to append a character vector to a 'tklistbox' with e.g. listio <- tklistbox( tktoplevel(), font='Courier', height=20, width=20, setgrid=TRUE) tkinsert( listio, 'end', letters[1:3]) tkpack( listio,side='left', expand=TRUE, fill='both') and three items would be added to 'listio'. This doesn't work in R-devel-- it looks as if only a single paste-collapsed item is added. This might even be intentional, but seems u...
2005 Aug 13
0
tkinsert matrix - how to display a matrix with tcltk
dear list, I have problems with tkinsert I need to display a matrix as a result of my function, but when I use tkinsert(txt, "end", myMatrix, sep="\n") I simply obtain a string. I do: n<-tclVar() tclObj(n)<-matrix(data, ncol=lenght) tkinsert(txt, "end", tclvalue(n), sep="\n") any hints?...
2008 Nov 03
1
possible tcltk event loop problem
...x=10, pady=0, columnspan=2) tkgrid(.messages, messagesYscroll, sticky="news", columnspan=2) tkgrid(messagesXscroll) tkgrid(messagesFrame, sticky="news", padx=10, pady=0, columnspan=2) I was able successfully to write directly to the script and output windows: > tkinsert(LogWindow(), "end", "\n testing \n") <Tcl> > tkinsert(OutputWindow(), "end", "\n testing \n") <Tcl> But writing to the message window, though it produced no error, also had no visible effect: > tkinsert(MessagesWindow(), "end&quot...
2007 May 30
5
determining a parent function name
...cltk. Something like: error <- function(...) { msg <- paste(..., sep = "") 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) } B...
2007 Oct 08
3
tcltk scrollbar
...uot;multiple",yscrollcommand=function(...)tkset(scr1,...),background="white",exportselection=FALSE) lsbDim2<-tklistbox(tt,height=10,selectmode="multiple",yscrollcommand=function(...)tkset(scr2,...),background="white",exportselection=FALSE) for (i in 1:70) { tkinsert(lsbDim1,"end",i) } for (i in 1:70) { tkinsert(lsbDim2,"end",i) } tkgrid(lsbDim1,scr1,lsbDim2,scr2) tkgrid.configure(scr1,rowspan=10,sticky="nsw") tkgrid.configure(scr2,rowspan=10,sticky="nsw") [[alternative HTML version deleted]]
2006 Jun 21
0
Some R-Tcl/Tk-BWidget newbie questions.
...;, expand=TRUE) ### --> This works, but not sticky="news", ### --> the notebook does not resize together with the window tn <- tkwidget(tt, "NoteBook") tkgrid(tn, sticky="news") ### --> I guess there is a simpler way to do this ... tbn <- tclvalue(tkinsert(tn, "end", "Algemeen", "-text", "Algemeen")) tkpack(tbw.algemeen <- .Tk.newwin(tbn)) tkpack(tab.algemeen <- tkframe(tbw.algemeen)) tbn <- tclvalue(tkinsert(tn, "end", "Relaties", "-text", "Relaties")) t...
2009 Sep 14
1
summary of rpart-Object in tktext window?
Hi, is it possible to put a summary of an rpart-Object into a tktext-window? Here is what I'm trying to do: fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) tt <- tktoplevel() tex <- tktext(tt) tkpack(tex) tkinsert(tex, "end", summary(fit)) But since the summary of an object is a list, I always get back the following error-message: cannot handle object of mode 'list' So, is there a different tk-window I should use for this kind of "list" or does anyone have an idea how to put...
2001 Feb 22
2
Problem with tcltk listbox
...above. Then selecting the second item in A , the first of B is highlited. Below the source fragments: prot.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,sid...
2008 Jul 22
1
tklistbox and extracting selection to R
...o select an option from a list: require(tcltk) tt<-tktoplevel() tl<-tklistbox(tt,height=ntx,selectmode="single",background="white") tkgrid(tklabel(tt,text="Select the legend of" )) tkgrid(tl) treatments<<-levels.tx for(i in (1:ntx)) { tkinsert(tl,"end",treatments[i]) } OnOK<-function() { tx.choice1<<-treatments[as.integer(tkcurselection(tl))+1] tkdestroy(tt) } OK.but<-tkbutton(tt,text=" OK ", command=OnOK) tkgrid(OK.but) tx.choice1 the console can't find...
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
...tkpack(tkbutton(tl, text="exit", command=function()tclvar$done<-"T")) tclvar$done <- "F"; tkwait.variable("done") tkdestroy(tl) } 2. If I try to insert a text containing an unequal number of "{" and "}" brackets tkinsert stops with the error message: Error in .Tcl(.Tcl.args(...)) : [tcl] extra characters after close-brace. How can I change this behavior? tk.test2 <- function(nmax=3){ library("tcltk") tl <- tktoplevel() tl.text <- tktext(tl) tkpack(tl.t...
2005 Feb 04
1
Output from function to a tcltk window
I would like to display output to a tcltk window from e.g. a call to summary(). I tried to get something else than oneliners into a text window of the kind found at: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/TextWindows.html But without success. Henrik ------------------------------------------------------------- Henrik Andersson Netherlands Institute of Ecology - Centre for
2005 Sep 02
1
tcltk - automatically moving cursor to last line of tktext box - how?
Hi; I have a program which writes lines to a tktext box (of height, say, 10) with tkinsert(txto, "end", paste(so,"\n")) I would like my program to be such that it automatically scrolls down through the text box when it is full so that I always see the last 10 lines written. Can anyone help on this? Best regards S??ren
2006 Oct 21
0
tcltk: multiple listboxes, selection
...# X values frame.x <- tkwidget(tt, "labelframe", text = "X value") tl.x <- tklistbox(frame.x, height = length(xvals) / 2, width = 50, selectmode = "browse", background = "white") for(i in seq(from=1, to=length(xvals), by=2)) { tkinsert(tl.x, "end", xvals[[i]]) } tkselection.set(tl.x, 0) tkgrid(tl.x, sticky="news") # Y values frame.y <- tkwidget(tt, "labelframe", text = "Y value(s)") tl.y <- tklistbox(frame.y, height = 20, #length(yvals) / yvals.field.count,...
2007 May 30
0
checking for "viability" of a GUI component
...t(logwin, bg="white") tkwm.title(logwin," Log Window") loglabel <- tklabel(logwin, text="Logging Analaysis Information") tkgrid(loglabel) tkgrid(logtext) if (is.matrix(inputtext)) { for (i in 1:nrow(inputtext)) tkinsert(logtext, "end",paste(paste(inputtext[i,],collapse=" "),"\n",sep="")) } else tkinsert(logtext, "end",paste(inputtext,"\n",sep="")) export_button <- tkbutton(logwin, text = "Export Log", command=savel...
2006 Dec 12
2
tklistbox...
...;-tkframe(janela) tl<-tklistbox(janela,height=4,selectmode="multiple",background="white") tkgrid(tklabel(janela,text="Seleccione o(s) trimestre(s):")) tkgrid(tl) trim <- c("T1","T2","T3","T4") for (i in (1:4)) { tkinsert(tl,"end",trim[i]) } #tkselection.set(tl,2) #Listbox com as regiões t2<-tklistbox(janela,height=4,selectmode="multiple",background="white") tkgrid(tklabel(janela,text="Seleccione pelo menos uma das regiões:")) tkgrid(t2) reg <- c("Norte&qu...
2012 Nov 20
1
tcl/tk problem with tklistbox,the " " character and Rcmdr.
...levels.list2.scroll<-tkscrollbar(tt,repeatinterval=5,command=function(...)tkyview(levels.list2,...)) tkgrid(levels.list2,levels.list2.scroll) vec<-c("a","b",""," "," ") tkdelete(levels.list2,"0","end") for (var in vec) {tkinsert(levels.list2, "end", var)} tclvalue(tkget(levels.list2,"0"))# a tclvalue(tkget(levels.list2,"1"))# b tclvalue(tkget(levels.list2,"2"))# "" tclvalue(tkget(levels.list2,"3"))# " " it's ok tclvalue(tkget(levels.list2,"...
2009 Jul 09
1
Changing text in a tkentry widget
...s/editboxes.html) Now, I thought the whole point of the textvariable argument was to change the content of the tkentry widget. But, as you can see by running this code, changing the Name variable using assign does not change the content of the widget. Is there a function to update the content? tkinsert didn't seem to work when I tried it. Thanks, Richard Morey
2008 Nov 23
1
tklistbox - R-Objekt
...tk) tt<-tktoplevel() tl<-tklistbox(tt,height=4,selectmode="single",background="white") tkgrid(tklabel(tt,text="select method for LAI calculation")) tkgrid(tl) method<- c("method1","method2") for (i in (1:2)){ tkinsert(tl,"end",method[i]) } tkselection.set(tl,0) OnOK <- function(){ choice<-method[as.numeric(tkcurselection(tl))+1] tkdestroy(tt) } OK.but <-tkbutton(tt,text=" OK ",command=OnOK) tkbind(tkgrid, "<Return>&qu...
2010 Jul 21
1
tcltk resizing when using tkgrid for layout
...;white",font="courier", xscrollcommand=function(...)tkset(xscr,...),yscrollcommand=function(...)tkset(yscr,...), wrap="none") tkgrid(txt,yscr) tkgrid(xscr) tkgrid.configure(yscr,sticky="ns") tkgrid.configure(xscr,sticky="ew") for (i in (1:100)) tkinsert(txt,"end",paste(i,"^ 2 =",i*i,", ")) tkconfigure(txt, state="disabled") tkfocus(txt) This creates a scrollable text window, and it suffers from exactly the problem I described above. My question is: what needs to be changed in order to make the tktext widg...