Page 1 of 1
Text Entry Field
Posted: Tue Jan 31, 2012 11:00 pm
by Jerryab
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 ?
Re: Text Entry Field
Posted: Tue Jan 31, 2012 11:11 pm
by mwieder
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
Posted: Wed Feb 01, 2012 4:16 am
by Jerryab
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..
Re: Text Entry Field
Posted: Wed Feb 01, 2012 5:28 am
by FourthWorld
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?
Re: Text Entry Field
Posted: Tue Feb 07, 2012 6:36 am
by marksmithhfx
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.