control layer in a grp

Scott Morrow scott at elementarysoftware.com
Tue Oct 18 04:16:53 EDT 2005


Thanks to all who responded.  I learned some interesting things and 
adopted a better solution than the one I had. (Phil, your solution was 
just what I needed!)
Mark, I was trying to use the arrow keys to move across columns of 
fields where no useful field naming convention exists but the stacking 
order is identical between groups. ie. from control x of grp A to 
control x of grp B.
-Scott Morrow

Elementary Software
(Now with 20% less chalk dust !)
web     http://elementarysoftware.com/
email   scott at elementarysoftware.com
-----------------------------------------------------------------
Phil Davis wrote:
> 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

Ken Ray wrote:
> Well, actually there is, but it's a bit of a kludge -- if you're "in" 
> the
> group (i.e. the same as clicking "Edit Group" on the toolbar in Rev), 
> you
> can ask for the layer of a field and it will give you the stacking 
> order for
> that field in the group.
>
> So you can:
>
> 1) Select the group
> 2) Go into "editbackground" mode
> 3) Get the layer of the field you're interested in
> 4) Exit "editbackground" mode
>
> Like this:
>
> select group "myGroup"
> start editing group "myGroup"
> put the layer of field "TestField" into tLayer
> set the editBackground of the topStack to false
> answer tLayer
>
> HTH,
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com

Mark Wieder wrote:
> Scott-
>
> if you're looking for a specific button in a group, try something like
>
>  if the hilitedButton of group "gpFilter" is 6 then
>
> ...but you've got a group of *fields*? I've used groups of fields but
> then just referred to the fields by name, i.e., field "x" of group
> "abc". What problem are you trying to solve?
>
> -- 
> -Mark Wieder
>  mwieder at ahsoftware.net

Scott originally 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.




More information about the use-livecode mailing list