Using tab to get to the next object...

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Tom
Posts: 11
Joined: Wed Feb 13, 2008 10:25 pm

Using tab to get to the next object...

Post by Tom » Sun Apr 27, 2008 5:24 pm

I have an app that requires the user to enter a number of fields, select combo box items, etc. I would like the tab key to move the user to the next object as they are filling out the 'form'. How do I control which field the tab key will highlight?

Tom

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sun Apr 27, 2008 6:42 pm

Hi Tom,

If your fields are in the correct order (meaning their 'layer' property is in ascending order) then this should work pretty much automatically. However, you may want to set the 'tabOnReturn' property of your fields to make sure the form tabs to the next field when the user types a return key.

And when you do have to control which control gets the focus, you'll put somehting like this in the script of the 'source' control:

Code: Select all

on tabKey
  select char 1 to -1 of field "SomeOtherField"
end tabKey
Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply