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 ?
Text Entry Field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Text Entry Field
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.
Re: Text Entry Field
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..
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..
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Text Entry Field
This raises an interesting question for indexing: What keywords would you ideally expect to search for to turn up the solution in this case?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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Re: Text Entry Field
Or, if I understand Jerry correctly, I think you can get the same effect by checking the "TabOnReturn" parameter in the fields parameter window.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.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS