OS X Sheets

Geoff Canyon gcanyon at inspiredlogic.com
Fri Apr 19 17:39:01 EDT 2002


>> How can I go about implementing something like the slide out sheets that
>> OS X apps have?
>
>It's actually pretty easy.  I did it in my (soon to be released) program
>WebCam LIVE.  What you do is this.  Make a field with the standard
>"scanlines" background that all the Aqua windows use.  Then set the
>transparency on the field so that some of the card shows through.  Setup
>your "sheet" objects as you would like them to appear.  When you've got
>everything situated how you want it, make all of the objects, including the
>field, into a group called "sheet" or something.
>
>Then what you need to do is make a script that does 1 thing.  It moves it
>from offscreen above and down to where it's visible.  YOu can use the move
>command to simulate the Aqua version...
>
>    move group "sheet" from oldLocation to newLocation
>
>You might also want to set the move speed to something that seems like the
>norm.  Then in your sheet, make an OK button that performs the changes and
>moves the group back out of view.
>
>If you have any trouble getting yours to work then e-mail me and I'll send
>you a copy of the stack with the sheet I made.
>
>
>Derek Bump
>Dreamscape Software, Inc.
>http://www.dreamscapesoftware.com/
>


You can also do this with visual effects:

-- show the "sheet":
  show group sheet with visual effect scroll down

-- put the "sheet" away:
  hide group sheet with visual effect reveal up

You can control the display speed with the effectRate property. The advantage is that you don't have to do any housework if the group changes size. Just make sure it's at the top of the window, and that nothing else is layered above it (or you _can_ layer something above if that's your intent).
-- 

regards,

Geoff Canyon
gcanyon at inspiredlogic.com




More information about the use-livecode mailing list