Text Entry Field

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
Jerryab
Posts: 12
Joined: Fri Jan 13, 2012 1:49 am
Contact:

Text Entry Field

Post by Jerryab » Tue Jan 31, 2012 11:00 pm

Help needed on Text Entry Field.

I have a text entry field that I have been trying set as one line entry ONLY. I have had no luck doing this.

I want to enter some text and then press the return key and have it
acted on when that happens. All that happens now is next line happens.

Is this possible ?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Text Entry Field

Post by mwieder » Tue Jan 31, 2012 11:11 pm

Sure. Put a returnInField (and an enterInField for good measure) handler in the script of the text field. Do your processing in there and *don't* pass the returnInField message at the end of the handler.

Jerryab
Posts: 12
Joined: Fri Jan 13, 2012 1:49 am
Contact:

Re: Text Entry Field

Post by Jerryab » Wed Feb 01, 2012 4:16 am

Thanks, mwieder

That solved the problem. It sucks to be a newbe but I guess you have to start somewhere.
I sure don't like the documentation for Livecode. It is very hard to find things when your
new to Livecode and trying to find code structures that you don't know even exist.
Sure wish they would make it easier somehow to find code like what you suggested.

Anyway again. Thanks..

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Text Entry Field

Post by FourthWorld » Wed Feb 01, 2012 5:28 am

Jerryab wrote:I sure don't like the documentation for Livecode. It is very hard to find things when your
new to Livecode and trying to find code structures that you don't know even exist.
Sure wish they would make it easier somehow to find code like what you suggested.
This raises an interesting question for indexing: What keywords would you ideally expect to search for to turn up the solution in this case?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Text Entry Field

Post by marksmithhfx » Tue Feb 07, 2012 6:36 am

mwieder wrote:Sure. Put a returnInField (and an enterInField for good measure) handler in the script of the text field. Do your processing in there and *don't* pass the returnInField message at the end of the handler.
Or, if I understand Jerry correctly, I think you can get the same effect by checking the "TabOnReturn" parameter in the fields parameter window.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply