Scrolling views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Scrolling views

Peter Simmonds
I want to create a scrolling view. I have created a ScrollingDecorator as a
child
of my main view. When I run this I get the following exception:

10:18:36, 20 May 2004: 'UndefinedObject does not understand
#preferredLayoutExtentOf:'
UndefinedObject(Object)>>doesNotUnderstand:
ScrollingDecorator>>updateScrollBars
ScrollingDecorator>>placement:
ScrollingDecorator(View)>>restorePlacement:resolution:
ScrollingDecorator(STBViewProxy)>>restoreView
[] in ShellView(STBViewProxy)>>restoreView
OrderedCollection>>do:

How can I properly implement a scrolling view?

Peter Simmonds
Northampton, UK


Reply | Threaded
Open this post in threaded view
|

Re: Scrolling views

Schwab,Wilhelm K
Peter,

> I want to create a scrolling view. I have created a ScrollingDecorator as a
> child
> of my main view. When I run this I get the following exception:
>
> 10:18:36, 20 May 2004: 'UndefinedObject does not understand
> #preferredLayoutExtentOf:'
> UndefinedObject(Object)>>doesNotUnderstand:
> ScrollingDecorator>>updateScrollBars
> ScrollingDecorator>>placement:
> ScrollingDecorator(View)>>restorePlacement:resolution:
> ScrollingDecorator(STBViewProxy)>>restoreView
> [] in ShellView(STBViewProxy)>>restoreView
> OrderedCollection>>do:
>
> How can I properly implement a scrolling view?

My guess is that you nilled the layout manager of the decorator.  It
might be easiest to delete it and paste another.

The idea is to put a view inside the ScrollingDecorator, and the
scrolling is fairly automatic from that point.  Take a look at Ian's
archives for specifics on caculated extents, etc.  Also, look for
#usePreferredExtent.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Scrolling views

Ian Bartholomew-19
In reply to this post by Peter Simmonds
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.