Drawers

Wilhelm Sanke sanke at hrz.uni-kassel.de
Sat Aug 9 15:01:01 EDT 2003


On Sat, 9 Aug 2003 Klaus Major <klaus at major-k.de> wrote:



> Hi Wilhelm,
>
> (snip)
>
> > I tried the drawer command and find that to change the size of a stack
> > to simulate a drawer and after that again collapse it would need only
> > slightly more scripting and is more elegant.
>
>
> I really would like to see this in action...  [;-)]
>
> Would you be willing to share or let us take a look?
>
> Regards
>
> Klaus Major
> klaus at major-k.de
> www.major-k.de
>



Hi Klaus,

sure.

First of all I want to say that I of course welcome the new drawer
command.

But I think it should still be improved, in its present form it is
simply putting another stack right, bottom, or left in relation to the
calling stack and at a distance of about 15 pixels. Nothing else can be
controlled. But maybe this already serves a number of purposes.

The first thing that came to my mind when I looked at the new command
was Jan Schenkel's excellent sample stack. Here is the URl of his stack
from  his post of July 8th on the Revolution list:

http://www.geocities.com/janschenkel/downloads/drawertest.zip

I experimented myself both with showing extra stacks (similar to Jan
Schenkel's solution) and changing the size of a stack.

On of my examples can be found on the Runrev User Contributions page,
not the first one on the list, "Magic Triangle" that may be also worth a
look, but farther down version 1.2 of  "Topsearch". After having made a
search, a "collapsible" extension can be opened and closed again at the
bottom of the stack.

Of course this technique of changing the stack size is nothing
especially original.

 I have seen a number of examples elsewhere, even in the old
"Application Overview" of Revolution 1.0, which was tediously slow in
some situations to make it almost and really unusable in a number of
cases (In some situations you had to wait 20 minutes and longer until
all controls of a card were displayed etc.). This slow speed  (see the
discussion on the Revolution list "speed of application overview" two
years ago) was caused by inedaquate and verbose programming and by
structural misunderstandings. Such things happen.
So there is also a script for a stack extension (changing the stack
size) in this Application Overview, but I would not recommend it because
it is also "over-programmed".

My own substitution for the Application Browser, "revbrowser.rev", uses
the extension technique, too, but with a simpler script and similar to
that of the Topsearch tool. Same for my "mcbrowser" for Metacard, which
is sort of a Control Browser with a number of added features. Both
stacks must be in use - or lying around - by a some list members that
requested these stacks also two years ago. Could it be that one of them
is already hidden somewhere on your computer?-

Changing the size of stack has the advantage that there is a smooth
transition between the basic stack and the extension. The disadvantage
is that you can have only *one* extension at a given side, usually at
the  right side and at the bottom.

If you want to have more than one "drawer" at one side you have to use
stacks.

Suppose you want to have three drawers at the right side:

Create three drawer stacks whose sum of heights is the height of the
base stack (or otherwise, if you like).

Pin the topleft of drawer 1 to the topright of the base stack. Pin the
bottomleft of the drawer  3 to the bottomright of the base stack. Set
the topleft of the middle drawer to (the topright of the base stack with
substraction of height/3 of the base stack from item 2 of the topright
of the base stack).


And, if you do not simply want to show and hide the drawers, but want to
achieve a real "drawer" effect,  like with a visual effect, set the
width of the drawers first to 0 and use a repeat loop to expand and
later collapse the drawers.-

Hope this was not redundant to you,

Best regards,

Wilhelm






More information about the metacard mailing list