Reorder fields

Martin Koob mkoob at rogers.com
Sat Jul 29 16:45:22 EDT 2023


Hi MarkwI did not see your later post that the fields were grouped.  My scenario was just the most basic case of fields on a card.  I guess it would work if all the fields were in 1 group but having fields in different groups certainly complicates things. Cool solution though.  I wasn’t aware of the relayerGroupedControls option.  Reading the entry in the Dictionary I learned some interesting things about groups and layers.   
e.g. you can move an object out of a group by setting its layer above the layer of the topmost object in the group or conversely  setting it below the bottommost object in the group. Hmmm…. What could you do with that?

True the old brain needs a bit of a work out once in a while to keep the neurons running.  Thanks for posting your question.

Martin

> On Jul 29, 2023, at 11:00 AM, Mark Smith <marksmithhfx at gmail.com> wrote:
> 
> On 29 Jul 2023, at 3:27 pm, Martin Koob via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>> wrote:
>> 
>> The two ways I have used are either with the property inspector  or by script.
>> 
>> Property Inspector
>> - click the ‘Position’ tab of the property inspector
>> - Change the number in the ‘Layer’ field either directly or by using the arrow keys.
> 
> Thanks Martin, but as noted, "items won’t relayer if they are grouped and “relayingGroupedControls" is set to false. That was exactly the situation I was in. In my case, field A was grouped with label A, etc so attempting to relayer them failed. I didn’t notice they were grouped because Select Grouped was not chosen in the menu bar. With Select Grouped chosen it’s easy to see the label-field grouping, and then to relayer the groups (not the fields inside the groups) if need be. Or, you can use the PB to do this by just dragging the groups around to relayer them. Finally, there’s a property called relayerGroupedControls which will allow you to relayer objects inside a group. If that had of been “true” instead of the default “false” I would have been able to relayer them in the first instance. But you have to be careful with this option as it can also revise the grouping. BTW, I just tried it (grouped the labels and fields, set the relayerGroupedControls option to true, turned off Select Grouped) and I was able to select the individual fields and relayer them using the Layer field in the Property Inspector. Kinda cool but my goodness you really have to know your stuff to make that manoeuvre happen. 
> 
> But also thank you for the opportunity to discuss this further. It helps with the encoding of this new information into my ageing brain 😊 And also, if I got any of it wrong, please correct me. 
> 
> Mark
> 



More information about the use-livecode mailing list