[Rd] Scrolling a tkcanvas non-starter

From: Anne George <ag_at_idesignsoftware.com>
Date: Tue, 22 Jun 2010 14:57:46 +0000


Hello,

Is it possible to scroll a canvas that has a column of listboxes in it? Does scrolling only work with listboxes and text widgets? The following code displays the scrollbar, but

I created this from examples on the forum, but other than that, I cannot find any documentation or online help in this area.

tt <- tktoplevel() # Create a new toplevel window tkwm.geometry(tt, "700x600")
tkwm.geometry(tt,"+5+5")
...
yscr <- tkscrollbar(tt,orient="vertical",  command=function(...)
 tkyview(column1,...) )

column1 = tkcanvas(tt, height=200, yscrollcommand = function(...) tkset(yscr, ...)) divBandListbox1 = tklistbox(column1, width=65, height=15, selectmode="single")

divBandListbox2 = tklistbox(column1, width=65,height=15, selectmode="single") divBandListbox3 = tklistbox(column1, width=65,height=15, selectmode="single")

tkgrid(column1,yscr,sticky="ew")
tkgrid.configure(yscr, sticky="ns")

#column1 = tkcanvas(tt, height=200, yscrollcommand = function(...) tkset(yscr, ...)) column1 = tkcanvas(tt, height=200)
tkconfigure(column1, yscrollcommand = function(...) tkset(yscr, ...))

Thanks very much. I appreciate any insight into this, or if R/tcltk is not supposed to be used this way. My system is msWindow 7, R2.10.0, tcltk 8.5.

Anne George

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 22 Jun 2010 - 15:00:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jun 2010 - 17:41:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive