Data-Entry in a LiveCode form using the tab key

Bob Sneidar bobs at twft.com
Mon Apr 18 12:43:37 EDT 2011


Or you can get a list of fields whose focusable is true and locktext is false (because you don't want to tab to labels now do you) and then present the developer with an interface where they can click sequentially on the fields in the order that they want to tab through, then save that list in a property of the card. Your tab through function can then get the short name of the current target, find it in the property list, check to see if it's the last one, get the first item if so, the next item if not, and then focus on that field. 

The advantage to this approach is that it will work universally for any card. Ideally you would want to copy every editable field on the card to a new one, along with a Cancel and Save button, and then save the list of fields in a property of the original card. 

It's a bit of work to start with, but if you make a lot of forms, this is definitely a good function to have. One of my apps has this, but I will have to go dig back through them to find it. 

Bob


On Apr 17, 2011, at 2:56 PM, Pete wrote:

> I like that!  Might even be good to have a custom property that defines the
> next field?
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> 
> 
> 
> 
> On Sun, Apr 17, 2011 at 11:11 AM, <dunbarx at aol.com> wrote:
> 
>> Mike is correct of course. Sometimes though, it is either inconvenient or
>> counterproductive to re-order the fields. You can always trap the tabKey
>> message and explicitly select the text of the field you want:
>> 
>> 
>> on tabKey
>> select the text of fld "yourNextField"
>> end tabKey
>> 
>> 
>> Put this in all the fields in your tab order and designate the one to
>> follow.
>> 
>> 
>> Craig Newman
>> 
>> 
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: EDWARD DENES <cathy1 at optonline.net>
>> To: use-livecode at lists.runrev.com
>> Sent: Sat, Apr 16, 2011 7:16 pm
>> Subject: Data-Entry in a LiveCode form using the tab key
>> 
>> 
>>        I have constructed a form in LiveCode; I want to complete the data
>> entry in each field by using the tab key.  Is there a way to reconfigure the
>> "tab sequence" of fields so that as one tabs and then types in the data, one
>> progresses through each field sequentially throughout the form?
>>                                               Thanks,
>>                                                 Ed Denes
>> 
>> CONTACT INFO:
>> 
>> Edward J Denes
>> 510 Allyndale Drive
>> Stratford, CT 06614-4308
>> 
>> cathy1 at optonline.net
>> 
>> (203) 378-3111
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list