Newsgroup: comp.lang.tcl
Subject: scrolling in canvas widget
When I create a scrolled window how can I write a "see" method that
will automatically changing the viewing area to show the tagged item
as the top most item?
I have tried looking at all of the iwidgets demos and all the free
code I could as well as the manual page for the canvas widget.
Could someone point me in the right direction?
I have tried computing the yscrollincrement when I use a fixed height
for all items I add to a canvas and then use yview scroll # units
from the top but it does not work. Could the secret be in the
scan dragto and yview moveto fraction calls.
The only thing I have gotten to work is setting the "yview scroll 1 pages" which
sets the viewing window to the next to last item but I naver see the last item
in the canvas.
__
Rick Evans c/o Engineous Software
1800 Perimeter Park, Suite #275
Morrisville, NC 27560
919-319-7666 (ext 126)
http://www.engineous.com/
Simply use a scrollable canvas widget ? You have some examples with the
interface builder XF or SpecTcl
Hope this helps
Herve