Weird textfield issue

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
user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Weird textfield issue

Post by user#606 » Sat Mar 02, 2013 1:08 pm

I am using Livecode V5.5.4 and am being plagued by a weird problem.
In the attached stack, normal text fields are used to enable input of names and addresses etc.
If the number of lines used exceed the visible lines (6), adding a line by using RETURN on the keyboard, results in the cursor jumping to the next field, as though TAB had been used.
You might think this is trivial, but I cannot find any reason for this behaviour.
Your advice please!
Sorry, cannot attach the stack!?!?

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm
Location: Oklahoma, USA

Re: Weird textfield issue

Post by doc » Sat Mar 02, 2013 4:20 pm

I'm not sure that I can help, since I am using version 4.53, which is well before the updated field controls.
What type of field is it? (plain, basic table, etc?)


You should be able to attach the stack file by using a compressed zip file. Maybe someone will come along, able to assist.

Regards,
-Doc-

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Weird textfield issue

Post by user#606 » Sat Mar 02, 2013 4:25 pm

The problem has now been traced to the Tab on return setting of the field properties.

Making that property false overcomes the problem of adding onto the end of the field.
BUT
there is no way (aboart from using the mouse) to access the next field.
Obviously, speed of input by using the tab key is essential.
So, how do I get easy text addon and tab?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Weird textfield issue

Post by sturgis » Sat Mar 02, 2013 4:42 pm

If you turn off autotab (tab on return) the tab key still works fine to move you to the next field, and the return key will still jump you to the next line in the current field.

If you need a more complex set of actions you can add script for returninfield, enterinfield. If you need to be able to add tabs to fields and use another method to switch between fields, that is possible too with some scripting.

For example if you want to be able to type tabs into the field, a script like so..

Code: Select all

on rawkeydown pKey
if numtochar(pKey) is tab then
put tab into the selection
else
pass rawkeydown
end if
Sorry for the extra info, not sure what your end goal is so figure extra info can't hurt.

EDITED: to fix morning "DOH" issues.

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Weird textfield issue

Post by user#606 » Sat Mar 02, 2013 5:00 pm

Thank you sturgis,
Removing Tab on return allows the text to be added and still moves me to the next field.
I did not try the tab key after I set Tab on return to false.
I feel really silly now, I just assumed if setting it to true did what it said, setting to false would do the opposite.
Now I wonder what the point of the setting is?

The extra bit you provided is always useful to others.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Weird textfield issue

Post by sturgis » Sat Mar 02, 2013 5:41 pm

The tabkey on return setting is actually pretty useful. Want a text field that allows only 1 line of input? Easy to turn that on, with the bonus that when you hit enter it moves to the next field for entry. All depends on what you're going for.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”