Home > Archive > Tcl > October 2005 > Re: still need scrollbar help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: still need scrollbar help
|
|
| Bryan Oakley 2005-10-21, 7:03 pm |
| mitch wrote:
> That doesn't seem to change anything...
> what I am trying to do is display a small window, containing a large
> canvas. (only the portion of the canvas under the small window will be
> visible.) The canvas will contain many "items". I want to be able to
> move around the canvas like a map, to get to the different parts of the
> canvas where the various Items are .
What you're saying is you want to move the 1800x1600 canvas around
inside the frame? It's possible (search the wiki for scrollable frames),
but I don't think that is necessary in this case.
If you want to draw in a 1800x1600 area but only view 800x600 at a time,
just make your canvas be 800x600 and the scrollregion 1800x1600. This
gives you an 800x600 viewport into a 1800x1600 drawable area. With that,
you don't need the surrounding frame (except maybe for aesthetic or
layout reasons)
canvas .top.c -width 800 -height 600 -scrollregion {0 0 1600 1800}
| |
|
| OK,
so if I wanted to place an Item just out of view to the right of the "viewable
window", I would place it on the canvas at canvas coordinate 900 200. ??
Then I could scroll right to see that Item?
(assuming canvas 0,0 is at upper, left)
(thanks for the help on this , scrollbars drive me nuts )
....M'
Bryan Oakley wrote:
> mitch wrote:
>
>
>
> What you're saying is you want to move the 1800x1600 canvas around
> inside the frame? It's possible (search the wiki for scrollable frames),
> but I don't think that is necessary in this case.
>
> If you want to draw in a 1800x1600 area but only view 800x600 at a time,
> just make your canvas be 800x600 and the scrollregion 1800x1600. This
> gives you an 800x600 viewport into a 1800x1600 drawable area. With that,
> you don't need the surrounding frame (except maybe for aesthetic or
> layout reasons)
>
> canvas .top.c -width 800 -height 600 -scrollregion {0 0 1600 1800}
| |
| Bryan Oakley 2005-10-21, 7:03 pm |
| mitch wrote:
> OK,
> so if I wanted to place an Item just out of view to the right of the
> "viewable window", I would place it on the canvas at canvas coordinate
> 900 200. ??
Yes.
>
> Then I could scroll right to see that Item?
> (assuming canvas 0,0 is at upper, left)
yes.
|
|
|
|
|