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
 - it has no thumb 
 - does not respond to mouse clicks. 
 - the vertical height of the tkcanvas (i.e. column1) is unconstrained. It's lower edge is out of view, and the lower button on the scrollbar is out of view.
I expected the scrollbar and canvas to have a height of 200 pixels and to be able to use the scrollbar to bring different listboxes into view.

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")

-- also tried these steps for configuring the canvas --

#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]]

