>To: r-help at stat.math.ethz.ch
>Subject: [R] tcltk - text widget with a scrollbar?
>Original-Sender: mmiller3 at iupui.edu
>From: mmiller3 at iupui.edu (Michael A. Miller)
>Date: 13 Aug 2002 11:41:28 -0500
>User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>MIME-Version: 1.0
>
>Can anyone show me how to connect a scrollbar to a text widget
>using the tcltk library? I'm confused about how to make sure the
>two widgets know about each other and how to set up the
>appropriate call-backs for scrolling.
The following code should work:
> library(tcltk)
> top <- tktoplevel()
> mytext <- tktext(top)
> myscr <- tkscrollbar(top, command = function (...) tkyview(...))
> tkconfigure(mytext, yscrollcommand = function(...) tkset(myscr, ...))
> tkpack(myscr, side = "right", fill = "y")
> tkpack(mytext, fill = "both", expand = TRUE)
>
>Mike
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._