search for: tkmessagebox

Displaying 20 results from an estimated 32 matches for "tkmessagebox".

2007 Dec 28
4
Return Value of TCl/Tk window in R
Hello, I have the TCl/Tk command "tkmessageBox(titel="",message="x",icon="question",type="okcancel")" in my R script. Now I want to perform some operation in relation to the user's choice, something like "if (okpressed) xxx else yyy" What values does this command give and how are they...
2009 Sep 22
0
tkmessageBox font size
Hi, I´m using the tkmessageBox widget of package tcltk. I would like to change the font size of the message. How can I do it? Thanks in advance, Srpd Partilhe as suas memórias com quem quer que deseja. Com quem quer que deseja. _________________________________________________________________ .aspx?tab=1 [[alterna...
2008 Oct 22
0
Bug when importing datas with tcltk window (PR#13191)
...en each time. Most of the time I can't finish the importation of my 3 data folders, but sometimes I am successful. Here is my function: require(tcltk) import.donnees.f = function() { #### openObservations.f = function(){ name1<-tclvalue(tkgetOpenFile()) if (!nchar(name1)) tkmessageBox(message="Aucun fichier n'a ?t? s?lectionn?!") else tkmessageBox(message=paste("Vous avez s?lectionn? le fichier ",name1)) assign("fileName",name1,envir=.GlobalEnv) } openUnitobs.f = function(){ name2<-tclvalue(tkgetOpenFile()) if (!nchar(name2))...
2008 Mar 19
1
Radio Buttons or similars
...t,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") tkmessageBox(message="Good choice! An apple a day keeps the doctor away!") if (rbVal=="oranges") tkmessageBox(message="Good choice! Oranges are full of Vitamin C!") print(rbVal); return(rbVal); } OK.but <- tkbutton(tt,text="OK",command=function...
2011 Oct 24
1
strsplit convert data
I am using the following code but I do not know the debug and run for correct errors library (tcltk) file <-tclvalue (tkgetOpenFile ()) if (nchar (file)) { tkmessageBox ("Select the file") } else { tkmessageBox (message = paste ("Was select file", file)) Dataset <- read.table (file, header = FALSE, sep = "", na.strings = "NA", dec =".", strip.white = TRUE) Dataset } input <- readLine...
2005 Aug 22
1
Internationalization questions
...posed previously. These pertain to Windows (I've tried under Win XP but assume the issue is more general) and R 2.1.1 patched and 2.2.0 devel. (1) I've noticed that the standard Windows dialogs in R -- whether initiated from the Rgui menus, from winDialog(), or from tcltk functions such as tkmessageBox() -- do not have button labels translated when running in a non-English locale. For example, when running in a French locale, the command winDialog(type="yesnocancel", message=gettext("Save workspace image?", domain="RGui")) produces a dialog box with the message t...
2012 Feb 24
1
tcl tk command function with arguments ??
Hello, I am using R 2.11.1 under Windows XP. I would like to know if its possible to use a function with arguments as a command in tcl tk. For example require(tcltk) PressedOK <- function() { tkmessageBox(message="You pressed OK!") } tt <- tktoplevel() OK.but <- tkbutton(tt,text="OK",command=PressedOK) tkgrid(OK.but) tkfocus(tt) the function PressedOK has no arguments and its use in "tkbutton(tt,text="OK",command=PressedOK)" is without any brackets. Un...
2003 Nov 03
0
problem with fix() called from Rcmdr
...) cat(paste("\nR-cmdr>", line, "\n")) command } and JustDoIt() is defined as follows: justDoIt <- function(command) { result <- try(eval(parse(text=command), envir=.GlobalEnv), silent=TRUE) if (class(result)[1] == "try-error"){ tkmessageBox(message=paste("Error:", strsplit(result, ":")[[1]][2]), icon="error") tkfocus(.commander) return() } result } The function activeDataSet() has the following definition (but I doubt that the problem is there, since Rcm...
2010 Jan 16
0
'tcltk' crashes related to event-loops (PR#14187)
...you continue, please read NOTE2 located towards the end of the message. To reproduce you need to load 'tcltk' and 'cairoDevice' in the same R --vanilla session. When executing the following in that order, in a new terminal window: require(tcltk) require(cairoDevice) ReturnVal <- tkmessageBox(title="Greetings from R TclTk",message="Hello, world!",icon="info",type="ok") ### click "ok" I get a crash (confirmed by Dirk---copied---on his Debian system) with the following message (see R-tcltk-cairoDevice.txt): > The program 'R' re...
2006 Aug 02
2
tcl/tk bind destroy event
...d although. I also implemented a menu item 'Quit' where I show the same messagebox and there it works fine. How can I make it work or is there another method to do this? I'm very new to R and tcl/tk. Here is part of my code: exitProg <- function() { returnVal <- tkmessageBox(title="Question", message="Save modified file?", icon="question", type="yesnocancel", default="yes") returnVal <- as.character(returnVal) if( returnVal == "yes" ) { # save file value <- sa...
2007 Dec 29
3
tcltk again
...#39;m stuck again. With the help of my script some functions are plotted on the display, then I ask if the user wants to save it as pdf. In windows I use winDialog and it works. But I can't succeed in Linux. In short: ---------------------------------------------------- X11() ... res <- tkmessageBox(title="Beenden?", message="Vor dem Beenden als PDF speichern?", icon="question", type="okcancel") if (tclvalue(res) == "ok") ... ----------------------------------------------------- So far every thing is OK. Now I want a box the user...
2008 Jan 15
3
How to interrupt a loop by pressing a key?
Hello, Does anyone know a way of interrupting a loop by pressing a key (besides ctrl-c)? My problem is the following: I have a machine acquiring data and saving text files into a directory. I have an R script that read those files, process them and plots the results. What I would like to do is: process the data as the files appear in the folder (I've done that do with a loop that checks
2009 Jun 12
1
Gtk objects disappears
..., I have a question. When I run a RGtk code in my terminal (without using the R GUI) R --vanilla << "EOF" source("myRGtkcode.R") EOF the GTK objects do not remain on the screen. Until now, I "bypass" this problem using the following commands: require(tcltk) tkmessageBox("Press to exit") But it is not really satisfactory and the tcltk Box cannot be minimized (at least in Mac OSX). Any idea? Best regards. Olivier -- ____________________________________ Olivier G. Nuñez Email: onunez@iberstat.es Tel : +34 663 03 69 09 Web: http://www.iberstat.es...
2007 May 13
1
Dropdown boxes in tcltk and R
...ot;Orange","Banana","Pear") comboBox <- tkwidget(tt,"ComboBox",editable=FALSE,values=fruits) tkgrid(comboBox) OnOK <- function() { tkdestroy(tt) msg <- paste("Good choice! ",fruitChoice,"s are delicious!",sep="") tkmessageBox(title="Fruit Choice",message=msg) } OK.but <-tkbutton(tt,text=" OK ",command=OnOK) tkgrid(OK.but) tkfocus(tt) tkwait.window(tt) fruitChoice <- fruits[as.numeric(tclvalue(tcl(comboBox,"getvalue")))+1] fruitChoice Which gives me: Error in structure(.Exter...
2010 Jul 22
1
check menu button (tcltk)
Hi,   I am making a mock user interface in tcltk and I would like to add a 'check menu button' such as shown here: http://zetcode.com/tutorials/pygtktutorial/images/checkmenuitem.png   Does anybody know how to do this? I am quite new to R. Cheers!! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine,
2008 Dec 22
1
newbie question on tcltk
...label(top,text=" ")) topMenu <- tkmenu(top) tkconfigure(top, menu = topMenu) fileMenu <- tkmenu(topMenu, tearoff = FALSE) openRecentMenu <- tkmenu(topMenu, tearoff = FALSE) tkadd(openRecentMenu, "command", label = "5 ", command = function() tkmessageBox( message = "xxxxx", icon = "error")) tkadd(openRecentMenu, "command", label = "6", command = function() tkmessageBox( message = "yyyyy", icon = "error")) tkadd(fileMenu, "cascade", label = "BBB", m...
2006 May 30
1
executable file with R
Hi, I made an R function, and I want make an executable applet with it. Do you know how it is possible? Thank for your help. Romain -- Lorrilli?re Romain UMR 8079 Laboratoire Ecologie, Syst?matique et Evolution B?t. 362 Universit? Paris-Sud 91405 Orsay cedex France tel : 01 69 15 56 85 fax : 01 69 15 56 96 mobile : 06 81 70 90 70 email : romain.lorrilliere at
2006 Aug 11
2
tkinsert
...My second problem, I use the run function that i have found in R TCLTK example Evaluating R Code From A Text Window in R TclTk: run <- function() { code <- tclvalue(tkget(txt,"0.0","end")) e <- try(parse(text=code)) if (inherits(e, "try-error")) { tkmessageBox(message="Syntax error", icon="error") return() } cat("Executing from script window:", "-----", code, "result:", sep="\n") print(eval(e)) } topMenu <- tkmenu(tt) tkconfigure(tt, menu=topMenu) fileMenu...
2011 Mar 04
1
Problems with a function warning
Hello. I have the following funtion: fechasEntrega = function(FechasEntrega,fecha){ if(length(which(FechasEntrega<fecha))>0){ tkmessageBox(title = "Error en Fecha de Valoracion",message="Hay una fecha de entrega anterior a la fecha de valoracion. Todas las fechas de entrega deben ser posteriores a la fecha de valoración para el correcto funcionamiento del programa.", icon="error", type="ok")...
2004 Jun 09
1
Using macros
...nction() { help(helpSubject) } helpButton <- tkbutton(window, text="Help", width="12", command=onHelp) } ) test <- function(){ top <- tktoplevel() onOK <- function(){ tkmessageBox(message="Foo.", icon="info", type="ok") tkdestroy(top) } OKCancelHelp(helpSubject="lm") tkgrid(OKbutton, cancelButton, helpButton) } test() That is, the OKCancelHelp macro makes the buttons and the cal...