Displaying 3 results from an estimated 3 matches for "validatecommand".
2012 May 24
3
set tkscale by tkentry
...tktoplevel()
tkpack(m1<-tkscale(tt,from=306870.00, to=3026741, label="alpha",
variable="varalpha",showvalue=TRUE, resolution=1,
orient="horiz"),side="bottom")
tkpack(tkentry(tt,width="10",textvariable="varalpha",validate="key",validatecommand="string
is double %P"),side="bottom")
As you can see, varalpha is a global variable (I think in tcl, not in R),
and if you change the parameter by the scale, the value in tkentry is
updated. If I want to set now the value of varalpha by tkentry, it bugs.
Does anyone have an ide...
2007 Jan 01
0
autofill for a tkentry field
..."Plum", "Mango")
tkdestroy(tt)
tt <- tktoplevel()
pw <- tkframe(tt)
ppw <- tk2labelframe(pw, text="Fruits:")
f1 <<- tclVar("")
entry1.f <- tkentry(ppw, width=30, textvariable=f1, validate="key",
validatecommand=autofill)
tkgrid(entry1.f)
tkgrid(ppw)
tkgrid(pw)
I don't know how to pass arguments to the autofill function, so I can
manipulate the textvariable. Any help is much appreciated. If we get a
working solution, maybe we should add this example to
http://www.sciviews.org/_rgui/tcltk/index...
2008 Aug 11
3
tkentry that exits after RETURN?
...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 ...
getPassword <- function(){
require(tcltk)
tt <- tktoplevel()
pass=tclVar("")
label.widget <- tklabel(tt, text="Enter Password")
password.widget <- tkentry(tt,show="*",textvariable=pass)...