Scollbar in SystemWindow

Trygve Reenskaug trygver at ifi.uio.no
Thu Mar 18 07:54:45 UTC 2004


Hernan,
Many thanks. It worked at the first try. As so often happens in our 
business, I got what I asked for, but it wasn't what I needed. I couldn't 
find a sensible size of the inner morph, pum.

So I went for a one way ScrollPane and let the width be set to fill the 
available space:

| scrollablePanel pum |
scrollablePanel _ ScrollPane new.
pum _ PasteUpMorph new
         extent: 1 at 800;
         color: Color white;
          layoutPolicy: TableLayout new;
         hResizing: #spaceFill; vResizing: #rigid.
scrollablePanel scroller
         addMorphBack: pum;
         color: Color red.
scrollablePanel openInWindow
         setWindowColor: Color lightGray;
         extent: 300 at 300

It doesn't work as intended. The pum bounds stays constant at 1 pixel even 
after resizing the window.

I have a talk in April. I planned to give great illustrations of my 
material by replacing PowerPoint with Squeak. I am 6 weeks behind schedule.

Squeak has turned out to be a wonderful experience. But it has been 
disappointingly hard to approach her. I still don't master output, i.e., 
the layout mechanism. And I still don't master input, i.e., the event 
mechanism.

I have to go for a hack and hope to get something to show.

Again, many thanks
--Trygve






At 17.03.2004 14:37, you wrote:
>Hi Trygve,
>         Try putting your PasteUpMorph instance inside a TwoWayScrollPane. 
> Like in
>here:
>
>| scrollablePanel pum |
>scrollablePanel _ TwoWayScrollPane new.
>pum _ PasteUpMorph new
>         extent: 800 at 800;
>         color: Color white.
>scrollablePanel scroller
>         addMorphBack: pum;
>         color: Color red.
>scrollablePanel openInWindow
>         setWindowColor: Color lightGray;
>         extent: 300 at 300
>
>This is what you were asking?
>
>Regards,
>Hernan



> > Trygve Reenskaug
> >
> > I have a SystemWindow with one pane that is subclass of PasteUpMorph. It
> > shall have the simplest possible layout giving me full control of
> > position
> > and size of submorphs.
> >
> > What is the best way for making it scollable, preferably in both
> > directions
> > if it can be done reliably.
> >
> > Thanks
> > --Trygve


-- 

Trygve Reenskaug      mailto: trygver at ifi.uio.no
Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway





More information about the Squeak-dev mailing list