More scrolling images
Dar Scott
dsc at swcp.com
Mon Mar 1 17:08:37 EST 2004
On Monday, March 1, 2004, at 03:49 AM, Ken Norris wrote:
> I finally sort of deciphered a little of this and put it together with
> what
> I did before. I made a grc and grouped it with scrollbars, then turned
> on
> edit group and referenced a fullscreen image, sent it to the back,
> shut off
> edit group.
In the Revolution goc, "grc" means "graphic" not "image", so I'm
confused. I don't know what it is for.
> Then I click-checked Select Groups and selected the image, installed my
> mousemove scripts, switched group id's and voila! It works! And yes,
> the
> group did need the border.
>
> Not sure about setting margins to 0 though
This is only for the outer group. If you don't use the outer group,
then don't bother.
For me, I have trouble working with locking a location and locking the
size being the same, and I prefer to make those independent.
Here is how I did this:
1. I created an image using "Import as Control...".
2. I grouped this and named this "Inner Group". (If you do a bunch of
custom control scripting then use a smaller name, because those should
be me-relative.)
3. I set the margins of the group to 0 (Text Formatting pane). This
has to be done before steps 4 and 5. (Bug?)
4. I went to the Size and Position pane of the property inspector. I
set the size to 200 X 200 and checked lock size and position. Use
whatever you want for the size; you can change it later.
5. I went to the Basic Properties pane and turned on the scroll bars.
On OS X, change the scroll width from 16 to 15.
6. At this point it has no border and you can't move it.
7. Make sure Select Grouped is off. Select the group. In the message
box execute "group". That creates a new group. (The group button will
try to ungroup, so don't use it.) Name it "Scrollable Image". You can
now move this control in your card layout, but if you change cards it
will not resize.
8. Now for the border. I set the margins of the custom control (group
"Scrollable Image") to 0. On the Basic Properties pane I turned off
3d, and turned on the border. This border will grow out from the inner
group and will not cover the image. The size of the custom control is
exactly the size of the inner group plus (double) the borders.
Ta-dah!
(I deleted a bunch of stuff of interest only to weirdos like me, such
as custom properties.)
Dar Scott
--
****************************************
Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services
****************************************
More information about the use-livecode
mailing list