Tab Order Property?

Bob Sneidar bobs at
Thu Dec 8 11:34:23 EST 2011

On Dec 8, 2011, at 7:50 AM, Ken Ray wrote:

>> Also I discovered a bit of a flaw in my code. If I click on a field that is a part of a group then I will likely throw an error, because you cannot set a fields layer to something higher than the layer of the highest layered object in the group. In other words, you have to change the layer of the entire group, not just the field itself. Hence the following update:
>> on clickOrder
>>   put the selectedobjects into theObjectList
>>   repeat for each line theObject in theObjectList
>>       if "of group" is in theObject then
>>           put wordoffset("group", theObject) into firstWord
>>           put word firstWord to -1 of theObject into theNewObject
>>           set the layer of theNewObject to top
>>       else
>>           set the layer of theObject to top
>>       end if
>>   end repeat
>> end clickOrder
> Good update, Bob, but if you happen to select multiple items in the same group, then the group itself will come to the front multiple times. So either you'd have to go with 'selectGroupedControls' turned off and not adjust the layer of objects inside of groups, or you'd need to expand the code to handle relayering objects inside of groups (I know that someone posted a bit of code to do this a few months ago).
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at
> Web Site:	
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Good point Ken. For my own purposes I always group a field with it's label. This way the first group will always be the one I want, but I can see right away that if I nested groups, I would be in a helluva state. I avoid nesting groups anyway if I can because it was such a *expletive deleted* working with groups when I first started. 

Didn't Hypercard have a tab order property? That would be a great addition I think. You could have a tabObjects property and a tabOrder property, both of which would only be effective if the tabObjects property was set by the programmer. Otherwise it could act the way it does now, using layers and the traversalOn property of each object. 


More information about the Use-livecode mailing list