Re: image layers within a group

Scott Raney ((no email))
Sun, 23 Apr 1995 13:11:19 -0600 (MDT)

> I have two or more images tha represent different status of
> an equipment. I made a group of these in order to have a pile.
> My goal is to show the image that represent the particular status in
> which the equipment is.
> I tried to involve "layer" property of those images but I didn't succeed.
>
> Es.
>
> in the scripts of that group ....
>
> on xxxxx
> .....
> set the layer of image "yyyy" to 1
> .....
> end xxxxx

You can't set the layer of individual objects in a group without
ungrouping and regrouping the group.

> on xxxxx
> .....
> ungroup me
> set the layer of image "yyyy" to 1
> group
> .....
> end xxxxx

Setting the layer to 1 puts the object *under* all the other objects.
You would want to set the layer to "the number of controls". But this
won't work anyway, since what you're doing will mess up the stacking
order, putting objects in an order such that some of them are outside
the layer of the group (the layers of all the objects in a group must
be contiguous). Not to mention the fact that group and ungroup only
work on selected objects, which you can't use in a non-Home stack
environment.

> Does someone have an idea about that ?

The problem is that you're taking the wrong approach. What you want to
do is hide and show objects, not put them on top of each other. The
latter is hard to do, and is much slower since all the images get
redrawn in all cases.

Even better than using "hide" and "show" would be to import all the
images onto a spare card and create a button to use as a status
display. Setting the "icon" property of the button to the id of the
image you want to display is the quickest, most efficient, and easiest
to maintain way to solve this particular problem.
Scott

> Thanks in advance for your help.
> _____
> ___[_____]___
> (.) (.)
> (_)
> ============================o00O========O00o============================
> ____|____|____|____|____|____|____|____|____|____|____|____|____|____|
> _|____|____|____|____|____|____|____|____|____|____|____|____|____|____|
> ____|____|____|____|____|____|____|____|____|____|____|____|____|____|
> _|____|____|____|____|____|____|____|____|____|____|____|____|____|____|
>
>
>
> ______________________________
> / / ___/ ___/ / /_ _/
> / /--/___ / ___/ /_/ / / /
> /_____/_____/_____/_____/_/_/_/
>
>
>
> CANAL Gianni
> Researcher
>
> CSELT
> Centro Studi E Laboratori
> Telecomunicazioni S.p.A.
>
> 274, v. G. Reiss Romoli
> I-10148 Turin Italy
>
> Tel: +39(11)2285630
> Fax: +39(11)2285069
>
> Email Gianni.Canal@cselt.stet.it

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************