Displaying 20 results from an estimated 34 matches for "tkcmd".
2001 Feb 03
1
tk non-widget commands (esp. update and winfo)
...ckage is work in progress"?)
Example:
> tt <- tktoplevel ()
> tkwinfo ("width", tt)
[1] "200"
Could (Should?) be:
> tt <- tktoplevel ()
> tkwinfo ("width", tt)
[1] 200
with
> tkwidth <- function (widget) as.numeric (tkcmd ("winfo", "width", widget))
Maybe a better example is the use of logical results:
> if (tkwinfo ("exists", tt)) cat ("exists\n")
Error in if (tkwinfo("exists", tt)) cat("exists\n") :
argument of if(*) is not interpretab...
2002 Mar 14
1
gif, jpeg and png image files reader AND tcltk image
...ng 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)
> x.data <- tkcmd(x, "data")
gives you the data for the image, but is in a format internal to tcltk. But
then it turns out
that the format is very straightforward to understand: the enclosed simple
function de...
2004 Apr 23
4
Tcl Tk table
...;,myRarray[i+1,j+1],sep=""))
tt<-tktoplevel()
table1 <- tkwidget(tt,"table",variable="tclArray", rows="50", cols="50")
tkpack(table1)
#Old version which worked in R 1.6 but it doesn't work with R 1.9 (and also not with 1.8), why??
tkcmd(.Tk.ID(table1),"tag","celltag","gruen",list(c("3,3", "4,4", "5,5", "6,6", "7,7", "8,8")))
tkcmd(.Tk.ID(table1),"tag","configure","gruen",bg="green",fg="green")...
2003 Jul 29
1
Tktable active cell
...ler will be run BEFORE the default event
handler which updates the active cell, so you will get the
PREVIOUS active cell, (and the first time you will get an
error because there is no active cell).
The Tcl help for bind :
http://aspn.activestate.com/ASPN/docs/ActiveTcl/ActiveTcl8.4.1.0-html/tcl/TkCmd/bind.htm
suggests that you may be able to use a "+" in front of your
event handler name so that it is "appended to any existing
binding", but this feature may not be implemented in R Tcl/Tk
yet, e.g. this didn't seem to work:
tkbind(table1,"<Button 1>",pa...
2003 Jul 30
1
Tktable White column when WIDTH>13
...olumns on the screen and the
default column width is 10 characters in the default font.
Can you fit 130 characters across your screen easily?
Perhaps you could specify colwidth="5" or something smaller than
10 when you create the table, then later on, you could widen
some columns with :
tkcmd(.Tk.ID(table1),"width","0","10")
tkcmd(.Tk.ID(table1),"width","1","10")
...
(to widen the first 2 columns to 10 characters)
Or don't specify the width option (number of columns) in
tkwidget(tt,"table",width = ...
Just leave...
2002 Feb 11
0
read.table in TCL/TK interface
...extvariable=yvar)
submit.but <- tkbutton(tt,
text="submit",command=function()tclvalue(done)<-1)
done <- tclVar(0)
tkpack(y.entry)
topMenu <- tkmenu(tt)
tkconfigure(tt,menu=topMenu)
fileMenu <- tkmenu(topMenu,tearoff=FALSE)
load <- function() {
file <- tkcmd("tk_getOpenFile")
if (!length(file)) return()
chn <- tkcmd("open", file, "r")
#tkinsert(txt,"0.0",tkcmd("read",chn))
chn <- read.table(file,na.strings="?",headers=TRUE)
tkcmd("close",chn)...
2004 Aug 05
1
tcltk: repeat event while button is down?
Is there a way in TCL/TK to trigger an event multiple times while a
button is held down? I'd like to have an rgl scene continuously
rotate until the button is released.
Duncan Murdoch
2005 Sep 05
1
tcltk, X11 protocol error: Bug?
...is below. If anyone sees something
I am doing foolish
let me know, otherwise I will file a bug report.
Nicholas
##### File clrramp2.r ##############
require(tcltk)
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(t...
2007 Jul 05
4
Me again, about the horrible documentation of tcltk
How on Earth can I know what are the arguments of any of the functions of
the tcl/tk package? I tried hard to find, using all search engines
available, looking deep into keywords of R, python's tkinter and tcl/tk, but
nowhere I found anything remotely similar to a help.
For example, what are the possible arguments to tkgetOpenFile?
I know that this works:
library(tcltk)
filename <-
2004 Jul 05
1
Tk force refresh
I'm trying to use a Tk widget to show some progress &
intermediate results in a long-running R calculation.
Does anybody know how (or whether) I can force a window
redraw without waiting for the idle loop? Currently,
refreshes only seem to happen when we return to the R
toplevel read-eval-print loop.
Thanks,
Mark <><
2004 Jul 27
1
Re: R-help Digest, Vol 17, Issue 25
...x-ix86 tcltk libraries.
When I run the following comands, however, I get an R segmentation
fault:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> library(tcltk)
> addTclPath("/usr/local/ActiveTcl/lib")
> tclRequire("Img")
<Tcl> 1.3
>tkcmd("image","create","photo",tclVar(),file="/path/to/file.jpg")
Process R segmentation fault at Tue Jul 27 18:18:40 2004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've run this as root, and I get the same segmentation fault, So...
2003 Aug 15
1
menubutton don´t work
...white one, I intend to charge
the direccion of open files in a vector and then to elect with the
menubutton with which to work but not functions thanks.Ruben
library(tcltk)
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)
tkconf...
2003 Sep 08
1
add checkbutton and the variable(wrong length of vector "b")
...nd load 3 components
(environment, value and pointer) I wanted alone to charge the value (0 done
not select and 1 selected), and the length its wrong. Good, here are the
script so that they see it. Thanks Ruben
library(tcltk)
vectPath<-c()
b<-c()
archivos<-function(){
f<-tkcmd("tk_getOpenFile")
temparch<-tclvalue(f)
assign("vectPath",c(vectPath,temparch),.GlobalEnv)
temp<-0
assign("b",c(b,temp),.GlobalEnv) #charge the variable for the
checkbutton
cant<-length(vectPath)
j&l...
2004 Dec 28
1
win variable in tcltk
The following gives an error message:
library(tcltk)
win <- list(env="A")
tt <- tktoplevel()
but <- tkbutton(tt, text="X", command=expression(tkdestroy(tt)))
tkgrid(but)
however, if one comments out the win line (and removes the
win variable) then it works. It seems that tcltk is making
use of a variable called win with a component name of env
and I just happened
2001 Sep 19
2
tcltk: Difficulties creating menus
...button(mb, variable=color, text="blue", value="blue",
## command=set.bg)
##
## Error: Error in .Tcl(.Tcl.args(...)) :
## [tcl] bad option "add": must be cget or configure.
## tkadd(mb, tkcheckbutton, label="blue", variable=color)
##
## Dito
## tkcmd("add", tkcheckbutton, label="blue", variable=color)
tkpack(tkbutton(tt, text="Quit", command=function()tkdestroy(tt)))
Any pointers or examples would be greatly appreciated.
Thanks, Dirk
--
Better to have an approximate answer to the right question
than a precise...
2005 Aug 23
2
Using tcltk to display jpeg images
Dear R Helpers,
Does anyone know how to use tcltk to display jpeg images? The manual says
that
one must use Tk_PhotoCreateImageFormat to register the jpeg image handler.
The
"ActiveTcl User Guide"
(http://support.serv.ch/lang/tcl/img/doc/img-jpeg.html)
says:-
"The package img::jpeg is a sub-package of Img. It can be loaded as a part
of the complete
Img support, via package require
2002 Feb 15
1
embed image in R-tcltk canvas
Hi,
I think that R-tcltk doesn't have the capacity to display an image stored in
memory on a tkcanvas object, am I right?
I have digged around everything I can find from Peter Dalgaard and tcltk
references and drew my conclusion.
Can you, Peter, or some other gurus on the list, give us a pointer or two on
how to proceed to solve this problem? I am afraid that it may involve
writing C
2003 Jan 10
1
tclVar Question
Hi All...
In an attempt to read data from a file and feed it into a tcltk entry box,
I've run into difficulties. The following hopefully describes my dilemma:
tclvalue(x.var) <- 5
Works fine.
tclvalue("x.var") <- 5
Does not work. [Error: Target of assignment expands to non-language object]
tclvalue(eval(parse(text="x.var"))) <- 5
Also, does not work.
Any
2004 May 10
1
question about possibility with R - Tcl/tk library
Hi , i am using the R(1.8.1) tcl/tk library in order to build a graphical
user interface to mathematic function and i would like to know if it is
possible to retrieve the value of a tkentry to make a R vector
for exemple with an entry containing "1,2,3,4,5" i want to make a vector
which contains 1 2 3 4 5
i tried as.vector , as.list and even to write the object to a file with
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