search for: tklabel

Displaying 20 results from an estimated 63 matches for "tklabel".

Did you mean: mklabel
2006 Oct 17
2
tcltk crashes with bad color with text widget
Hello I have been playing with tcl/tk in R 2.4.0 on windows XP and have managed to crash R by supplying tcl/tk with an incorrect color. Is this a bug? is there a way for me to test the color to see if it is a valid tcl/tk color, to avoid this? tt=tktoplevel() tklabel(parent=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...
2007 Aug 14
2
Question about unicode characters in tcltk
...80 incorrectly? library(tcltk) m <-tktoplevel() frame1 <- tkframe(m) frame2 <- tkframe(m) frame3 <- tkframe(m) entry1 <- tkentry(frame1,width=5,bg='white') entry2 <- tkentry(frame2,width=5,bg='white') entry3 <- tkentry(frame3,width=5,bg='white') tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left') tkpack(tklabel(frame2,text='\u03bc\u2081'),side='left') tkpack(tklabel(frame3,text='\u03bc\u2082'),side='left') tkpack(frame1,entry1,side='top') tkpack(frame2,entry2,side='top') tkpack(frame3,e...
2008 Mar 19
1
Radio Buttons or similars
...on 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<- function() { rbVal <- as.character(tclvalue(rbValue)) tkdestroy(tt) if (rbVal=="apples")...
2008 Jun 16
0
Display a jpeg inside a widget which already has text
...nt.create(family="arial",size=16, slant="italic") fontHeading3 <- tkfont.create(family="arial",size=12) fontTextLabel <- tkfont.create(family="arial",size=12) fontlabel <- tkfont.create(family="arial",size=10,weight="bold") tkgrid(tklabel(tt,height=2,width=50, text="")) tkgrid(tklabel(tt,text="")) tkgrid(tklabel(tt,text="'Enhance Your Decision Making'",font=fontHeading2,foreground="black")) tkgrid(tklabel(tt,text=" v 4.0", font=fontTextLabel)) tkgrid(tklabel(tt,height=2,widt...
2008 Aug 11
3
tkentry that exits after RETURN?
...the user types a carriage return/ENTER in the text window? I've messed around a little with validate, validatecommand, but don't see any obvious way to do it ... getPassword <- function(){ require(tcltk) tt <- tktoplevel() pass=tclVar("") label.widget <- tklabel(tt, text="Enter Password") password.widget <- tkentry(tt,show="*",textvariable=pass) ok <- tkbutton(tt,text="OK",default="active", command=function()tkdestroy(tt)) tkpack(label.widget, password.widget,ok) tkwait.window...
2009 Oct 19
1
Problem with geometry manager in TclTK
...- tktoplevel() tkgrab.set(ask.form) tkfocus(ask.form) tkwm.title(ask.form,"Input Format") tkwm.resizable(ask.form, 0, 0) file.format <- tclVar("1") ReturnFormat <- "ID_CANCEL" Title.frame <- tkframe(ask.form, relief="groove") tkgrid(tklabel(Title.frame,text="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(Ch...
2006 Oct 23
1
R tcl/tk
...d am tying myself in knots over something that should be simple. I want to create a frame and put that frame inside the toplevel frame. This works (i.e. it places text in col 1, and the corresponding entry box in column 2) and later frame.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&...
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 problem, but getti...
2008 Dec 22
1
newbie question on tcltk
...back_but <- tkbutton (frameUpper, text = "BACK", width=20, height=1, default="active", overrelief="flat",anchor="w", borderwidth=4 ) tkgrid(frameUpper) tkgrid(frameOverall) tkpack (frameUpper, back_but, side='left', anchor='n') tkgrid(tklabel(top,text=" ")) fontHeading <- tkfont.create(family="arial",size=14,weight="bold") other_window <- function () { tkdestroy(top) tt <- tktoplevel(padx=100, pady=100) b1 <- tkbutton (tt, text = "3.", width=20, font=fontHeading, command...
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2008 Mar 31
2
tkconfigure throws an error
Thanks everybody for looking at this. I am trying to assign a script to a button please help: ############ library(tcltk) tt<- tktoplevel() 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")) #####...
2008 Jul 18
0
Retrieving data from a tcl /tk function
..._CANCEL") { dlg <- tktoplevel() tkwm.deiconify(dlg) tkgrab.set(dlg) tkfocus(dlg) tkwm.title(dlg, title) textEntryVarTcl <- tclVar(paste(entryInit)) textEntryWidget <- tkentry(dlg, width = paste(entryWidth), textvariable = textEntryVarTcl) tkgrid(tklabel(dlg, text = " ")) tkgrid(tklabel(dlg, text = question), textEntryWidget) tkgrid(tklabel(dlg, text = " ")) ReturnVal <- returnValOnCancel onOK <- function() { ReturnVal <<- tclvalue(textEntryVarTcl) tkgrab.release(dlg)...
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...10) { returnValOnCancel="ID_CANCEL" dlg <- tktoplevel() tkwm.deiconify(dlg) tkgrab.set(dlg) tkfocus(dlg) tkwm.title(dlg,title) textEntryVarTcl <- tclVar(paste(entryInit)) textEntryWidget <- tkentry(dlg,width=paste(entryWidth),textvariable=textEntryVarTcl) tkgrid(tklabel(dlg,text=" ")) tkgrid(tklabel(dlg,text=question),textEntryWidget) tkgrid(tklabel(dlg,text=" ")) ReturnVal <- returnValOnCancel onOK <- function() { ReturnVal <<- tclvalue(textEntryVarTcl) tkgrab.release(dlg) tkdestroy(dlg) # tkfo...
2006 Dec 12
2
tklistbox...
...---------------------------------------------- require(tcltk) #Criação da janela janela <- tktoplevel() tkwm.title(janela,"Apuramentos - Inquérito ao Emprego") #Estilo do texto estilo_texto <- tkfont.create(family="verdana",size=8,weight="bold") tkgrid(tklabel(janela,text="Trimestre:",font=estilo_texto)) cb1 <- tkcheckbutton(janela) cb1Valor <- tclVar("0") tkconfigure(cb1,variable=cb1Valor) tkgrid(tklabel(janela,text="1T"),cb1) #Listbox com os trimestres #janela <-tkframe(janela) tl<-tklistbox(ja...
2009 Sep 28
2
re trieve user input from an tcl/tk interface
...portant stuff should happen... tkdestroy(tt) } require(tcltk) tclRequire("BWidget") tt = tktoplevel() trials = tclVar("100") # I want to suggest default values but they should be editable. entry.trials = tkentry(tt, width = "3", textvariable = trials) tkgrid(tklabel(tt,text="Number of trials:")) tkgrid(entry.trials) Stimuli = tclVar("10") # I want to suggest default values but they should be editable. entry.Stimuli = tkentry(tt, width = "3", textvariable = Stimuli) tkgrid(tklabel(tt, text = "Number of stimuli:"))...
2006 May 22
1
rerender tcltk toplevel
...te the tclvariable assigned to it. This works nicely on windows systems but on my linux box (Suse10) the label is not updated on every round of iteration but rather once the iterator finishes. tt <-tktoplevel() tkwm.geometry(tt, "250x140") prog <- tclVar("0") label <- tklabel(tt, textvariable=prog) tkgrid(label) for(i in 1:50) { tmp <- rnorm(1e+05) tclvalue(prog) <- i*2 } When I combine both approaches and add the label to a toplevel that already contains the progress bar updating the label works: tt <-tktoplevel() tkwm.geometry(tt, "250x140&quo...
2020 Jun 07
7
use of the tcltk package crashes R 4.0.1 for Windows
Hi, The following code, from the examples in ?TkWidgets , immediately crashes R 4.0.1 for Windows: --------------------- snip -------------------- library("tcltk") tt <- tktoplevel() label.widget <- tklabel(tt, text = "Hello, World!") button.widget <- tkbutton(tt, text = "Push", command = function()cat("OW!\n")) tkpack(label.widget, button.widget) # geometry manager --------------------- snip -------------------- Session info (prior to the crash): ----------------...
2000 Sep 28
0
No subject
...below the sample function...Any help will be greatly > appreciated.... > > "tcltktst" <- + function(x="") { + xd <- read.table(x, header=T) + library("tcltk") + + tt <- tktoplevel() + tktitle(tt) <- "Diagnostics" + label.widget <- tklabel(tt, text="Choose!") + + pptlabs <- function() { + plot(xd$iv802, xd$PPT) + abline(0,1) + tt2 <- tktoplevel() + tktitle(tt2) <- "Identify Outliers" + lab.wid2 <- tklabel(tt2, text="Identify Outliers") + but.wid2 <- tkbutton(tt2, text=&q...
2010 Jun 11
1
Windows, OSX and Linux: updating a graphic device and double buffering
...h()? How can I run my code on all operating systems without any "jumps"? Regards, Adrian Waddell Here is a minimal example code: library(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=&...