Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

scroling in canvas widget

0 views
Skip to first unread message

Rick Evans

unread,
Dec 17, 1996, 3:00:00 AM12/17/96
to

I have been struggling with scrolling for a long time now within iwidgets and
itk and have yet to find the secret.

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/


Herve CHIBOIS

unread,
Dec 18, 1996, 3:00:00 AM12/18/96
to Rick Evans

Rick Evans wrote:
>
> I have been struggling with scrolling for a long time now within iwidgets and
> itk and have yet to find the secret.

Simply use a scrollable canvas widget ? You have some examples with the
interface builder XF or SpecTcl

Hope this helps

Herve

0 new messages