Disable Multi-line Input on Text entry field in livecode

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
shalu
Posts: 72
Joined: Fri Mar 20, 2015 1:05 pm

Disable Multi-line Input on Text entry field in livecode

Post by shalu » Tue Jul 07, 2015 7:28 am

Hi,

I am beginner in livecode, I am looking for how Disable Multi-line Input on Text entry field in livecode :roll:
--
Thanks
Shalu S

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Disable Multi-line Input on Text entry field in livecode

Post by Dixie » Tue Jul 07, 2015 7:33 am

set the 'dont wrap' in the property inspector of the field or, by script...

Code: Select all

set the dontWrap of field 1 to true

shalu
Posts: 72
Joined: Fri Mar 20, 2015 1:05 pm

Re: Disable Multi-line Input on Text entry field in livecode

Post by shalu » Tue Jul 07, 2015 7:39 am

If I am using enter key text move upwards
--
Thanks
Shalu S

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Disable Multi-line Input on Text entry field in livecode

Post by Dixie » Tue Jul 07, 2015 7:43 am

in the script of the field, put

Code: Select all

on enterInField
   exit to top
end enterInField

shalu
Posts: 72
Joined: Fri Mar 20, 2015 1:05 pm

Re: Disable Multi-line Input on Text entry field in livecode

Post by shalu » Tue Jul 07, 2015 7:54 am

Hi,

Still I can give multiple text :oops:
--
Thanks
Shalu S

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Disable Multi-line Input on Text entry field in livecode

Post by Dixie » Tue Jul 07, 2015 8:08 am

Oh !... it works here ...for me ... set the 'tab on return' to true as well...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Disable Multi-line Input on Text entry field in livecode

Post by dunbarx » Tue Jul 07, 2015 2:21 pm

Hi.

Are we sure we are understanding the original problem? What do you mean by "disable multi line..."? Is it that you want to restrict user entry to a single line? That is, to prevent a return character from being entered into that field?

Craig Newman

Post Reply