[R] Controling a tcl/tk slider

John Fox jfox at mcmaster.ca
Mon Sep 13 03:03:50 CEST 2004


Dear Johan,

If I understand you correctly, you want to change the position of the slider
without directly moving the "thumb." If so, you can simply change the value
of the variable associated with the slider; for example:

    top <- tktoplevel()
    Var <- tclVar("5")
    slider <- tkscale(top, from=1, to=10, showvalue=TRUE,
      variable=Var, resolution=1, orient="horizontal")
    tkgrid(slider)

    tclvalue(Var) <- "1"

I hope that this helps,
 John 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of J. Van Horebeek
> Sent: Sunday, September 12, 2004 6:20 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Controling a tcl/tk slider
> 
> 
> Hi,
> 
> Is there any command  in R that drags a tcl/tk slider to a 
> particular position (value)?
> 
>   thanks in advance,
> 
>      Johan Van Horebeek




More information about the R-help mailing list