Re-ordering layers

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
stephenlewis
Posts: 8
Joined: Sun Nov 16, 2014 3:05 am

Re-ordering layers

Post by stephenlewis » Mon Nov 17, 2014 1:58 am

Hi Guys

I would like to arrange for the user to be able to go through the fields in the correct sequence by tabbing. As I understand it I need to re-order the layers of the fields to arrange this, but the layer box in the inspector will not allow me to change the number and the arrows to the right do not work. I've tried selecting the fields in the tabbed order I want and also individually, but to no avail. None of the fields are in a group. What am I missing? Thanks.
Stephen
www.landscapesofwales.co.uk

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Re-ordering layers

Post by Simon » Mon Nov 17, 2014 2:30 am

Hi Stephen,
Without the fields being in a group I cannot reproduce what you are seeing. I do see that the Project Browser is not updating when using the inspector to relayer.
And to that, you can also use the PB to drag the layers around. I haven't figured out yet what the difference between a blue line or red line means, I had thought the red meant to group but it doesn't do that.

Oh and you are correct, for the tabs to work in order the fields must be in order.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10332
Joined: Wed May 06, 2009 2:28 pm

Re: Re-ordering layers

Post by dunbarx » Mon Nov 17, 2014 2:50 am

Hi.

This is a new one. Are you sure you have selected only one control when you are trying to change layers? You will be locked out if you select more than one. Are the arrows grayed out? I suspect operator malfunction.

Does the user set the tabbing order? Does this order change, or do the number of controls change?

It is always possible to explicitly set tab order in each field:

Code: Select all

on tabKey
select text of fld "whateverTheNextFieldMightBe"
end tabKey
And similarly, if you name your fields something like "f1, f2, f3, you can, in the card script:

Code: Select all

on tabKey
   select text of fld ("f" & last char of the short name of the target  + 1)
end tabKey
Why is this going to be a problem as it stands?

But this goes back to the first question. Who determines the field order and the number of fields?

Craig Newman

stephenlewis
Posts: 8
Joined: Sun Nov 16, 2014 3:05 am

Re: Re-ordering layers

Post by stephenlewis » Fri Nov 21, 2014 9:47 pm

Thank you for the input, and apologies for not replying sooner. The number of fields is fixed, and I would like the user to be directed through the fields in a particular order. The tabKey works fine, but I would prefer to re-order the layers correctly. I'm planning to have another go this weekend.
Stephen
www.landscapesofwales.co.uk

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10332
Joined: Wed May 06, 2009 2:28 pm

Re: Re-ordering layers

Post by dunbarx » Sat Nov 22, 2014 12:42 am

Hi.

OK, then you need to explicitly set the order. If you use the first example, your handler in each field will direct as needed. If the second, then the field naming order must follow your requirements.

Craig

Post Reply