scrollbar problems: Scrolling a blank stack

Ken Ray kray at sonsothunder.com
Thu Jul 22 03:18:38 EDT 2004


> For the new Rev developer requiring this extra bit of 
> smoke-and-mirrors 
> is a very unintuitive solution to what is a simple problem in 
> SuperCard 
> and ToolBook.

<soapbox>
Speaking of that, I would like to lobby that we get *real* scrolling windows
in Rev. SuperCard has them and it obviates a lot of the problems that have
been discussed here. Now I know someone will say "but you can get the same
effect with a group that scrolls and a boundingRect that is larger than its
normal rect", but as Richard just posted, you can't interactively create
objects inside of a group which is funky, combined with the excessive number
of steps to create a scrolling, resizable stack window that basically
represents an 8 1/2 x 11 "page" (540x720 pixels, for example).

To do this in Rev, you need to do this:

1) Create a stack
2) Set the maxWidth of the stack to 540 and maxHeight to 720
3) Create an empty group*
4) Set the rect of the group to the rect of the card
5) Set the lockLoc of the group to true
6) Turn on the horizontal and vertical scrollbars of the group
7) Set the boundingRect of the group to 0,0,560,740 (need to add the width
of the scrollbars) *
8) Use the Geometry Manager to bind the group to the card so it will resize
with the stack

   * Both of these need to be done via the Message Box since there's no
interface in the IDE for this.

In SuperCard you do this:

1) Create a window
2) Set the window to style "scrolling" and turn on the resizable of the
window
3) Set the background size to 540 x 720 and turn on the 'autoresize'

And that's only to CREATE the environment to start with. 

Suppose you (as developer) wanted to add two objects (say, 2 buttons), one
in the upper-left and one in the lower-right of your window, and assume that
you can't display the full 540x720 window on your monitor and that the group
is scrolled already to the upper-left. 

To do this in Rev, you do this:

1) Select the group and go into edit mode.
2) Create a button in the upper-left corner
3) Exit edit mode.
4) Scroll the group down to the lower-right corner
5) Go back into edit mode.
6) Create a button in the lower-right corner
7) Exit edit mode.

To do this in SuperCard you do this:

1) Create a button in the upper-left corner.
2) Scroll the window to the lower-right corner.
3) Create a button in the lower-right corner.

You see how easy it can be? Rev is 100x more powerful than SuperCard, but
this is one of those instances where I wish that Rev would adopt the
SuperCard approach to scrollable windows. It also removes all the funkiness
of having a *user* create an object in different parts of a scrolling area.
</soapbox>

Just my 2 cents,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list