similar to: callback environment for Tk buttons

Displaying 20 results from an estimated 4000 matches similar to: "callback environment for Tk buttons"

2008 Aug 11
3
tkentry that exits after RETURN?
I can set up an entry widget (thanks to an old post by Barry Rowlingson) that gets a password and exits when the user clicks on the "OK" button. Anyone have any clever ideas for returning/ destroying the window when 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 ...
2005 Jun 04
2
locator() via tcltk
Hello, I'm trying to write a function using tcltk to interactively modify a plot and gather locator() data. I've read Peter's articles in Rnews, the help pages in tcltk, http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/, plus a post in R-help sometime ago, but haven't found a solution. The idea goes something like this: require(tcltk) testplot <- function() { getcoords
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
Sorry, for my mail from last night contains no subject. Therefore, I send it again and two tcltk questions are appended. ---------------------------------------------------------------------------- Prasad wrote: > I wrote a function in R which uses tcltk package .... essentially I wanted > to give within that function, a widget with 2 radiobuttons to choose > between plotting Precip
2002 Sep 26
3
tcltk - command=function()
hi, just having the idea create a simple tcl/tk gui-dialog for different data-file formats i get starting problems and it would be nice get some tips/tricks from experienced tcl/tk user in R ! tt <- tktoplevel() label.widget <- tklabel(tt,text="Decision Tree GUI") button.widget <- tkbutton(tt,text="Select SPSSFile", command=function()
2009 Sep 28
2
re trieve user input from an tcl/tk interface
Hello everyone, this is my first post here and I hope I signed up correctly and someone will take me by the hand and help me out. I am new to R and cannot figure out what to do here... ... I want to have an User Interface that requests input. I want to save this input to a variable to use it later on. I was able to do this with a modalDiaglog (
2001 Sep 19
2
tcltk: Difficulties creating menus
I am struggling with adding menus to a tcltk application. The following example (from the O'Reilly book on Perl/Tk) works fine: #!/usr/bin/perl -w use Tk; my $mw = MainWindow->new; $menub = $mw->Menubutton(-text => "Color")->pack(); foreach (qw/red yellow green blue grey/) { $menub->radiobutton(-label => $_, -command => \&set_bg,
2003 Sep 08
1
add checkbutton and the variable(wrong length of vector "b")
Hello it wanted to add a boton of checkup in a menu, ?How I do to create so many variables as checkbutton? I try with the code that continues, use a vector that is charged dynamicamente while I open files but the component of vector "b" is associates with a Tcl variable and load 3 components (environment, value and pointer) I wanted alone to charge the value (0 done not select
2008 Mar 19
1
Radio Buttons or similars
Hello companions!!! I have a function that creates a Radio Buttons, and I need that this function return the selected value in the Radio Buttons. I would like that, if somebody know as I could return the value, you say me as do it. Next, I show the function function1<-function(){ require(tcltk) tt <- tktoplevel() rb1 <- tkradiobutton(tt) rb2 <- tkradiobutton(tt) rbValue <-
2008 Oct 27
1
ttkcombobox
Hi, all, (sessionInfo at the end) I've been struggling with the tcltk package and can't seem to get the ttkcombobox to work. Here's an example: library(tcltk) p <- tktoplevel() l <- tclVar() ## I don't know if I'm even calling it correctly cb <- ttkcombobox(p, values = letters[1:4], textvariable = l) tkpack(cb) 1. How do I know when the value of the combobox has
2002 May 29
2
Tcl/tk , question about the environment of the call
This is my simple code, my intention is to let the inner function browse the objects in the outer function. ####################### tk1 <- function() { tk2 <- function() { inner <- 3 list2 <- ls() #list objects in fuction tk2 print("**** inner objects ****") print(list2) #list objects in fuction tk1 list_parent <- ls(parent.frame())
2003 Aug 15
1
menubutton don´t work
Why the variable archOp does not take the value that be chosen in the menubutton?, therefore always remains as a 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()
2003 Jan 20
1
curious code mistakes
hi, know anybody why this happen ? I''m using winedt , the old code saved in an .R call syntax error''s. Curious is, when i''m type below the same code , it works ??? ...imho a print type problem, what i''m never before observed and can''t recognize with my eyes ? P.S. R.1.6.1 /w2k thanks for advance & regards,christian >>getfile <-
2006 Jun 26
1
Some tcltk-related packages not loading (OS X)
Dear r helpers, In my exploration of the tcltk facilities of R I've had some success but some failures, and wonder if someone could point me to a solution. To begin: ****************************************************** > sessionInfo() Version 2.3.1 (2006-06-01) powerpc-apple-darwin8.6.0 attached base packages: [1] "tcltk" "methods" "stats"
2011 Nov 07
1
tcltk window freezes when using locator( )
Hello useRs Using the following code: library(tcltk) win<-tktoplevel() ff<-function(){ plot(1:10,1:10) pol<-locator(1) print(pol) } button<-tkbutton(win,text="test",command=ff) tkpack(button) makes the win panel stop responding when the plot is closed before choosing a location. Usually, the windows task manager has to be used to
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,
2009 Oct 19
1
Problem with geometry manager in TclTK
Hello, everyone. I have the following problem with TclTk: I create some windows and want to change their position with geometry manage (sometimes they will be centered, sometimes not). If the toplevel is created and its dimensions are gathered via 'tkwinfo', I get (usually) correct values. However, if this window is created by a function (in the following example, by 'ask.format')
2002 Apr 22
2
Quit R by pressing button (tcltk) (PR#1475)
Full_Name: Joachim H. Strach Version: 1.3.1 OS: Windows 98 Second Edition Submission from: (NULL) (132.230.131.220) I am using the tcltk package. Error-example: ---- library(tcltk) top<-tktoplevel() but<-tkbutton(top,text="Quit",command=function() {q(save="no")} ) tkpack(but) ---- then press the Quit-Button. On my Platform there will be a execution fault with
2000 Sep 28
0
No subject
Prasad wrote: > I wrote a function in R which uses tcltk package .... essentially I wanted > to give within that function, a widget with 2 radiobuttons to choose > between plotting Precip and Temperature plots. After the user has chosen > one of the radiobuttons there is another widget that asking him to identify > outliers. However, I am having a lot of problems...what R does is
2008 Jul 18
0
Retrieving data from a tcl /tk function
Hello, I am sorry if this is an answered question, but I did my homework 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)
2008 Jul 22
1
tklistbox and extracting selection to R
Dear experts, I am trying to understand why is it that when I paste (into the R console) the following code to select an option from a list: require(tcltk) tt<-tktoplevel() tl<-tklistbox(tt,height=ntx,selectmode="single",background="white") tkgrid(tklabel(tt,text="Select the legend of" )) tkgrid(tl) treatments<<-levels.tx for(i in