Login  Register

Re: Scrolling views

Posted by Ian Bartholomew-19 on May 20, 2004; 11:57am
URL: https://forum.world.st/Scrolling-views-tp3370614p3370616.html

Peter,

> How can I properly implement a scrolling view?

You don't have to do too much to get a scrolling window.  Step by step...

- Start up the ViewComposer.
- File/New Shell View
- Set its #layoutManager aspect to BorderLayout
- In the ViewComposer's toolbox locate "Presenter.Scrolling container" and
drag drop onto the ShellView.
- Set the ScrollingContainer's #arrangement aspect to "Centre" (or "Center"
if you can't spell properly either :=) )
- In the ViewComposer's toolbox locate "Presenter.Default view" and drag
drop onto the ScrollingContainer.
- Set the #extent aspect of the inner container to, for example, 2000@2000.

Now, when you test the Shell (File/Test) you should be able to scroll
around.  Just to prove it....

- In the ViewComposer's toolbox locate "BooleanPresenter.Default view" and
drag drop two onto the innermost container.
- Set the #position aspect of one of them to 100@100
- Set the #position aspect of the other to 1800@1900

When you scroll around now you should find one CheckBox at the top left of
the scrollable area and the other at the bottom right.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.