More about images

Jan Schenkel janschenkel at yahoo.com
Sat Feb 8 01:59:01 CST 2003


--- "Ken Norris (dialup)" <pixelbird at interisland.net>
wrote:
> [snip]
> ----------
> Thanks for trying. Maybe I just don't fully
> understand what happens if you
> group the image. It has to be in a background
> behavior thing anyway.
> 
> Ken N.
> 

Hi Ken,

Let's see if I got this right:
- there's one large image with all the keys in their
"DOWN" position
- and you only want to show a small portion of this
image, at a specific place on the card

If that's correct, the solution I described ought to
work properly:
- when you resize a group, this doesn't resize its
contents but rather, it acts as a window, only showing
the part of its contents you want to display.
- you'll have to set its lockLocation to true, or it
will resize the first chance it gets ; and you'll have
to set the rect of the group to the size of what you
want to display.
- then you can control which part of all that's in the
group is displayed, by controlling the hScroll and
vScroll properties of the group.
- if you need to display it at different positions on
the card, set the topLeft property of the group ; this
has no effect on the displayed part of the group.

The easiest way to test this is to create a stack ;
toss a few buttons and fields on ; group the controls
; add vertical and horizontal scrollbars to the group
; resize the group ; lock its location ; and scroll
away :-)

Hope this cleared a few things up,

Jan Schenkel.

PS: don't forget to keep an eye on the group 'margins'
property, as otherwise you could get some side-effects
while scrolling.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the use-livecode mailing list