search for: tkwm

Displaying 20 results from an estimated 38 matches for "tkwm".

2009 Oct 19
1
Problem with geometry manager in TclTK
...ight. Provided below is quite detailed code, containing pretty much my entire functions, except the parts not related to TclTk. Thank you in advance, Gabriel Margarido. CODE: library(tcltk) ask.format <- function() { ask.form <- 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=&qu...
2007 May 30
5
determining a parent function name
Hi, All, I'm writing a wrapper for stop 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...
2006 May 22
1
rerender tcltk toplevel
...ackup there. So my second strategy was to use a simple toplevel with a label and update 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...
2005 Apr 23
1
tclServiceMode: stop Tcl/Tk from updating
In Windows, Tcl/Tk programs running under the tcltk package can update too frequently: for exmaple, we might go through a long sequence of operations to construct a complex display, and in Windows each addition will be shown separately. To work around this, I've added a function "tclServiceMode" which serves as an R interface to the "Tcl_SetServiceMode" function in the
2003 Feb 25
1
Re: A tcltk question
Hi, I am trying to create a light-weight window with no border and title bar. The following code does not work for me. base <- tktoplevel() tkwm.overrideredirect(base, TRUE) (or FALSE) Could someone help me out? Thanks. Jianhua Zhang Department of Biostatistics Dana-Farber Cancer Institute 44 Binney Street Boston, MA 02115-6084
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...! Hua ##=============================================== ## Add Dialog Box (with only "OK" button) ##=============================================== modalDialogOK <- function(title,question,entryInit,entryWidth=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),text...
2012 Nov 19
6
tcltk freezing using MS Windows for R-2.14+
...d(MainWindow) if (NMethod=="") return() tkconfigure(MainWindow,cursor="watch") tkfocus(MainWindow) }#end of NormalizeNow <- function(){ # GetNMethod <- function(MainWindow){ ReturnVal <- "RMA" GNMethod <- tktoplevel(MainWindow) tkwm.deiconify(GNMethod) tkgrab.set(GNMethod) tkfocus(GNMethod) tkwm.title(GNMethod,"Get Method") tkbind(GNMethod,"<Destroy>",function() {ReturnVal <- "";tkgrab.release(GNMethod);tkfocus(MainWindow);}) tkwait.window(GNMethod) return (...
2003 Jun 06
4
stuck tcltk scrollbars under Windows XP
Dear R-devel list members, I've encountered a problem with my Rcmdr package under Windows XP and could use some advice: The Rcmdr package uses the tcltk package to create menus and dialog boxes. My standard procedure when a dialog is created is to grab the focus -- e.g., by tkfocus(top) tkgrab(top) (Here, top is a top-level window -- say, containing one or more scrollbars.)
2005 Jul 12
1
help: how to use tkevent.generate(...)
Hello, I use package "tcltk" to do some GUI programming, and want to find a function which can do the operation "click a button", just like using a mouse to click. If tkevent.generate can do that? I tried it as below, but failed. Please give me a hint! tt <- tktoplevel() tkwm.title(tt,"Simple Dialog") onOK <- function(){print("OK")} onCancel <- function(){print("Cancel")} OK.but <- tkbutton(tt, text=" OK ", command=onOK) Cancel.but <- tkbutton(tt, text="Cancel",command=onCancel) tkgrid(OK.but,Cancel.but)...
2006 Mar 02
0
tcltk error when calling a dialog
...uttons are within a frame in a window named "dlg". I've removed nearly everything in this function and I still obtain the same error when clicking on a radiobutton. Even with this very simple remaining code: plotDialog1 <- function/()/ { mddlg2 <- /tktoplevel()/ tkwm./deiconify(/mddlg2/)/ tkgrab./set(/mddlg2/)/ tkwm./title(/mddlg2,"Plot options"/)/ onNO <- function/()/ { tkgrab./release(/mddlg2/)/ /tkdestroy(/mddlg2/)/ /tkfocus(/dlg/)/ } // NO.but <- /tkbutton(/mddlg2,text=&q...
2008 Jul 18
0
Retrieving data from a tcl /tk function
...for a long while and couldn't figure out a way to retrieve data entry from a model dialog. In one of the examples compiled by James Wettenhall: odalDialog <- function(title, question, entryInit, entryWidth = 20, 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...
2007 Jan 23
0
Refreshing the GUI and packing images
Dear all I'm developing a grafical interface for Geneland that is presently one of the R packages available. My first question is about refreshing the interface while running a very long process. run<-function(){ ? ? ? ? tttry <- tktoplevel() ? ? ? ? tkwm.geometry(tttry, "+200+200") ? ? ? ? tkwm.title(tttry,"wait") ? ? ? ? warn<-tklabel(tttry,image=imagepleasewait) ? ? ? ? tkpack(warn) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tkfocus(tttry) ? ? ? ? tcl("update") ? ? ? ? ? ? ? ? ? ? ? ? print("Starting...") ? ? ? ?...
2010 Jun 22
0
Scrolling a tkcanvas non-starter
...r and canvas to have a height of 200 pixels and to be able to use the scrollbar to bring different listboxes into view. I created this from examples on the forum, but other than that, I cannot find any documentation or online help in this area. tt <- tktoplevel() # Create a new toplevel window tkwm.geometry(tt, "700x600") tkwm.geometry(tt,"+5+5") ... yscr <- tkscrollbar(tt,orient="vertical", command=function(...) tkyview(column1,...) ) column1 = tkcanvas(tt, height=200, yscrollcommand = function(...) tkset(yscr, ...)) divBandListbox1 = tklistbox(column1, wi...
2011 Jun 03
2
tkrplot Newbie
..."^GSPC", from = "1960-01-01") Myhscale <- 2.5 # Horizontal scaling Myvscale <- 1.25 # Vertical scaling plotFunction <- function(x) { params <- par(bg="white") plot(x,main="A time series") par(params) } tt <- tktoplevel() tkwm.title(tt,"Time Series") img <- tkrplot(tt,fun=plotFunction((Cl(GSPC))),hscale=Myhscale,vscale=Myvscale) tkgrid(img) ## Although the output looks fine, I get the following message: <Tcl> > img <- tkrplot(tt,fun=plotFunction((Cl(GSPC))),hscale=Myhscale,vscale=Myvscale) Er...
2007 Mar 30
3
RWiki, tcltk and plot
...orm(100), rpois(100, lambda=10), runif(100), rt(100, df=2), rt(100, df=4)) colnames(matrix) <- c("Normal", "Poisson (lambda=10)", "U(0,1)", "Student t (nu=2)", "Student t (nu=4)") # # Now comes the interesting part # tt <- tktoplevel() tkwm.title(tt, "A bunch of distributions") dist.widget <- NULL plot.widget <- NULL for (i in 1:length(colnames(matrix))) { dist.widget[[i]] <- tklabel(tt, text=(colnames(matrix))[i]) plot.widget[[i]] <- local({ n <- i tkbutton(tt, text="PLOT", command=funct...
2008 Nov 08
1
Get Information
...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="{{JPEG Files...
2023 Mar 13
1
tcl tk: set the position button
Dear Rodrigo, Try tkwm.geometry(win1, "-0+0"), which should position win1 at the top right. I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ On 2023-03-12 8:41 p.m., Rodrigo Badilla wrote: > Hi all, >...
2004 Apr 14
1
Passing a pointer to .C() in Win32
Hi, Is there any way to pass an integer from R to C and have it cast as a pointer? # Win32 Example: library(tcltk) tt <- tktoplevel() hWndString <- tclvalue(tkwm.frame(tt)) # I'll avoid posting code to this function: source("http://bioinf.wehi.edu.au/folders/james/R/hexStringToDecimalInteger.R") hWnd <- hexStringToDecimalInteger(hWndString) system32 <- file.path(Sys.getenv("windir"),"system32") user32 <- file.path(...
2005 Oct 24
1
tk problem with R 2.2.0 on wine/linux
...gt; demo(tkttest) demo(tkttest) ---- ~~~~~~~ Type <Return> to start : > require(tcltk) || stop("tcltk support is absent") [1] TRUE > require(stats) [1] TRUE > local({ dialog.t.test <- function() { tt <- tktoplevel() tkwm.title(tt, "t test") x.entry <- tkentry(tt, textvariable = xvar) y.entry <- tkentry(tt, textvariable = yvar) alt <- tclVar("two.sided") d .... [TRUNCATED] ****************************************************** The source for this dem...
2004 Mar 19
5
loop through files in a dir
Hello I have data in many files in a directory, how can I loop through the files in a given dir in-order-to build a data.frame? thanks