search for: tktext

Displaying 20 results from an estimated 26 matches for "tktext".

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-me...
2009 Oct 12
0
tktext-window smaller than text
Hi there, I need to build up a tktext-widget that contains a longer text than the tktext-widget actually is. So what I mean is, that the tktext window is of width=100 and the text in it has a length greater 100. But I don't want the window to just wrap the line, but to belong to scrollbar that is able to scroll to the end o...
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
2009 Aug 24
1
Copy & Paste from tktext on Mac
...m working under Mac OS X and my text window doesn't really map these functions automatically - it works fine under Windows. Is there an easy way to map copy&paste functions to a text window under Mac OS X? This is what I'm doing with my text window: tt <- tktoplevel() txt <- tktext(tt, bg = "white", height=30, width=100, borderwidth=2) scr <- tkscrollbar(tt, orient = "vertical", repeatinterval = 1, command = function(...) tkyview(txt, ...)) tkconfigure(txt, yscrollcommand = function(...) tkset(scr, ...)) tkgrid(txt, column=0, row=0, columnspan=2, stic...
2008 Jun 12
0
read and write stdout() to tktext window
I've been trying to write the consoles output to a tktext window, but have not succeeded... Does anybody know if that works? Any help would be highly appreciated. Thanks in advance, Andreas Posch
2007 May 30
5
determining a parent function name
...top that produces a popup window using tcltk. 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", fi...
2002 Sep 10
3
capturing the result of print in a variable?
I'd like to capture the results of a print() command so that I can put the results in a tktext widget. I know I can redirect the output to a file with sink. I'm looking for something like that, but where I can redirect the output into a variable. Is there a way to do that? Mike -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read...
2008 Nov 03
1
possible tcltk event loop problem
...nifest itself. Some detail, and a kludgy solution appear below. What's odd is that the Rcmdr has three similar windows -- Script, Output, and Messages, created by the following code: For the messages window: messagesFrame <- tkframe(.commander) putRcmdr("messagesWindow", tktext(messagesFrame, bg="lightgray", font=getRcmdr("logFont"), height=3, width=log.width, wrap="none")) .messages <- MessagesWindow() messagesXscroll <- ttkscrollbar(messagesFrame, orient="horizontal", command=function(...) tkxview(.me...
2006 Oct 17
2
tcltk crashes with bad color with text widget
...ent=tt, text="hello world", foreground="reed") Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] unknown color name "reed". An error is displayed as one would expect, however when I try tktext(parent=tt, foreground="blaaack") R crashes, rather than displaying an error as tklabel did. This, however, does not happen on my FreeBSD machine, which displays an error similar to the one for tklabel and does not crash. Thanks for any help, Alex Couture-Beil
2010 Jul 21
1
tcltk resizing when using tkgrid for layout
...at all). require(tcltk) tt<- tktoplevel() xscr<- tkscrollbar(tt, repeatinterval=5,orient="horizontal", command=function(...)tkxview(txt,...)) yscr<- tkscrollbar(tt, repeatinterval=5, command=function(...)tkyview(txt,...)) txt<- tktext(tt,bg="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...
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
...I want to add a scrollbar along the right side of a text 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")...
2007 Oct 09
1
misbehaviour of some tk windows, R 2.6.0 on SUSE 10.1?
...done > demo(tkfaq) demo(tkfaq) ---- ~~~~~ Type <Return> to start : > require(tcltk) || stop("tcltk support is absent") [1] TRUE > local({ + + tt <- tktoplevel() + tkwm.title(tt, "R FAQ") + # Gave tiny font on some systems + # txt <- tktext(tt, bg="white", font="courier") + txt <- tktext(tt, bg="white") + scr <- tkscrollbar(tt, repeatinterval=5, + .... [TRUNCATED] ****************************************************** The source for this demo can be found in the file: /home/david/l...
2013 Jan 21
1
R Tcl/Tk: How to put widgets in text widget?
...a textbox, which you _can_ make scrollable. In Tcl/Tk, when $t is a text widget, the code would be as follows: button $t.help -bitmap questhead -command Help $t window create end -window $t.help But what is the R equivalent? From the general naming scheme I would have guessed something like 'tktext.window', but that doesn't exist. Any trick with 'tkconfigure', perhaps? Any help is urgently appreciated ;-) (Which could also be a totally different workaround ...) Cheers Christoph -- Dipl.-Biol. Christoph Lange Saatmoorgraben 15 28879 Grasberg http://geohash.org/u1qqkmpu6hzkc...
2010 May 02
1
Imprimir comandos R en una interfaz tcl tk
Hola a todos, me gustaría saber si hay alguna forma de hacer que los mensajes que se muestran en la ventana de comandos de R se muestren en una interfaz en tcl tk. Me gustaría modificar la salida del comando cat y que se muestre tanto en la ventana de comandos R, como en una variable de tipo tktext dentro de la interfaz. Muchas gracias. _________________________________________________________________ ¡Citas! ¡Ligues! ¿Salimos? ¿Cómo es tu pareja ideal? Búscala en[[elided Hotmail spam]] [[alternative HTML version deleted]]
2005 Feb 28
1
Getting width of Tk text widget via tcltk
...acters, of a Tk text widget that has been resized with the mouse? In the following code, the reported width of the text widget doesn't change, even though it has been resized. I can, however, get the current width in pixels: > library(tcltk) > top <- tktoplevel() > textWindow <- tktext(top, bg="white", height=20, width=80, wrap="none") > tkgrid(textWindow, sticky="news") <Tcl> > tkgrid.rowconfigure(top, 0, weight=1) <Tcl> > tkgrid.columnconfigure(top, 0, weight=1) <Tcl> > tkcget(textWindow, width=NULL) <Tcl>...
2008 Nov 08
1
Get Information
...new commer in R. I am using the library tcltk, i need few information about it. so that, i wrote the following programme to save the file, but when i save the file, i do not find the file save, please help me, in order to continue my projet. this is the programme: tt <- tktoplevel() txt <- tktext(tt) tkwm.title(tt,"Saisi des modalités") #intitule la fenêtre tkgrid(txt) tkmark.set(txt,"insert","0.0") topMenu <- tkmenu(tt) tkconfigure(tt,menu=topMenu) cascade =function () {fileName=tclvalue(tkgetSaveFile(initialfile="modalite.txt",filetypes="{{J...
2006 Aug 11
2
tkinsert
...39;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") tkinsert(txt,"0.0",var1) var2=paste("a=mean(c(1,2,3))") tkinsert(txt,"end",var2) But in my text window I have : x=2a=mean(c(1,2,3)) I d'like to have something like: x=2 a=mean(c(1,2,3)) 2)My second problem...
2002 Mar 14
1
gif, jpeg and png image files reader AND tcltk image
Hi all, Roger Peng and Jason Turner's suggestion with ImageMagick seem to be the simplest "dirty" way to get the problem solved. But I ran into yet another interesting but quite round-about way to solve the problem (partially). Through tcltk package, one can read in the gif image with > x <- tkcmd("image", "create", "photo", file=mypic.gif)
2006 Jun 26
1
Some tcltk-related packages not loading (OS X)
...tils" "datasets" "base" other attached packages: igraph "0.1.2" ****************************************************** A success: ****************************************************** > library(tcltk) > tt <- tktoplevel() > tkpack(txt.w <- tktext(tt)) <Tcl> > tkinsert(txt.w, "0.0", "plot(1:10)") <Tcl> > > eval.txt <- function() + eval(parse(text=tclvalue(tkget(txt.w, "0.0", "end")))) > tkpack(but.w <- tkbutton(tt,text="Submit", command=eval.txt)) <Tcl&...
2002 Aug 13
1
tcltk - text widget with a scrollbar?
Can anyone show me how to connect a scrollbar to a text widget using the tcltk library? I'm confused about how to make sure the two widgets know about each other and how to set up the appropriate call-backs for scrolling. Mike -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send