Page 1 of 1

Having hint text in textbox

Posted: Fri Dec 13, 2013 9:06 pm
by Tribblehunter
Hi all.
experimenting with app for mobile.
I have a series of text boxes for user input.
I wish to display in them the type of thing I want the user to put in them.
IE name, age, etc etc.
Is there an easy way to do this, or do I have to pre-fill the boxes with hint text (greyed out for example) in script,

Have been doing this in app inventor sucessfully, but unsure with Livecode.

Thanks

Brian

Re: Having hint text in textbox

Posted: Fri Dec 13, 2013 9:46 pm
by dunbarx
Hi.

Users are accustomed to grayed text as a hint. Pre-filling is easy. You would change the "foreGroundColor" of the field text from gray to black whenever anyone types into the field, and of course lose the hint text.

Are you OK with implementing this in LC?

Craig Newman

Re: Having hint text in textbox

Posted: Sat Dec 14, 2013 8:17 pm
by Tribblehunter
Hi Craig, and thanks for the confirmation of what I thought.

Yes I can soon learn how to implement this. Just working on paper plans at moment so will take a week or so before I start playing with code.

Then comes the hard part... lol

Brian

Re: Having hint text in textbox

Posted: Sat Dec 21, 2013 10:48 am
by FLCo
FieldFormatter can do this for you automatically...

Code: Select all

set the DefaultText of fld 1 to "Search..."
See http://livecode.com/store/marketplace/fieldformatter

Hugh Senior