control layer in a grp

Phil Davis davis.phil at comcast.net
Mon Oct 17 12:53:33 EDT 2005


Hi Scott,

To find the relative layer of a control whose name is unique to the 
current card, his will work:

   put (the layer of control "abc") into tObjectLayer
   put (the layer of the owner of control "abc") into tGroupLayer
   put (tObjectLayer - tGroupLayer) into tObjectRelativeLayer

I broke it into 3 statements to prevent line wrapping - you could do it 
all in one line if so inclined.

HTH -
Phil Davis



Scott Morrow wrote:
> I'm wondering if there is an easier (faster) way to discover the 
> stacking number of a specific field within a group (the control's 
> stacking number just within that group) without using a repeat structure 
> to step through all the controls in that group, checking each one to see 
> if it is a match.
> 
> -Scott Morrow
> 
> Elementary Software
> (Now with 20% less chalk dust !)
> web     http://elementarysoftware.com/
> email   scott at elementarysoftware.com



More information about the use-livecode mailing list