search for: tkgrab

Displaying 9 results from an estimated 9 matches for "tkgrab".

Did you mean: grab
2003 Jun 06
4
stuck tcltk scrollbars under Windows XP
...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.) When the window is closed, I release the focus, destroy the window, and return the focus to another window -- e.g., tkgrab.release(top) tkdestroy(top) . . . tkfocus(.commander) (Here .commande...
2009 Oct 19
1
Problem with geometry manager in TclTK
...get the value '1' for width and height. 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,tex...
2012 Nov 19
6
tcltk freezing using MS Windows for R-2.14+
...=="") 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 (ReturnVal) }#end of GetNMethod &...
2008 Jul 18
0
Retrieving data from a tcl /tk function
...ldn'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(tklabel(dlg, text = quest...
2013 Aug 03
1
tk + browser() can leave R unresponsive
...at the beginning of the onOK body (e.g. in Vim run <<:g/onOK/put ='browser()'>>). That is, transform onOK <- function() { res <- 1L + as.integer(tkcurselection(box)) cat("res is: ", res) ans.select_list <<- choices[res] tkgrab.release(dlg) tkdestroy(dlg) } to: onOK <- function() { browser() res <- 1L + as.integer(tkcurselection(box)) cat("res is: ", res) ans.select_list <<- choices[res] tkgrab.release(dlg) tkdestroy(dlg) } 4. Run...
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...=================================== ## 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),textEntryWidget) tkgrid(tk...
2006 Mar 02
0
tcltk error when calling a dialog
...ndow 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=" Cancel ",command=onNO/)/...
2005 Sep 05
1
tcltk, X11 protocol error: Bug?
...t;list") barlst <- tclArray() for(i in 1:n.col){ item<-tkcreate(canvas.r,"rect",xl,0,xl+inc,50, fill=rmpcol[i],outline=rmpcol[i]) ##tkaddtag(canvas.r, "point", "withtag", item) barlst[[i]]<-item xl <- xl+inc } tkgrab.set(tt) tkwait.window(tt) ##tkdestroy(tt) invisible(cr) }
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