Normal Topic Multi-Line Fields (Read 949 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Multi-Line Fields
Jun 13th, 2005 at 7:35pm
Print Post Print Post  
I created a Multi-Line text box and it seemed to wrap initially after I created it.  As you typed and got to  the "end" of the line (box on screen), it wrapped automatically.

Now it won't wrap for some reason and the text just continues on and on the same line.

What is considered to be the end of the line ? The width of the box ?

Also, is there a way to limit the amount of text to be entered so that it does not exceed the parameters of the box i.e.: height of 170 and width of 850 ?

Even though I have created a multi-line text box, I still want to limit the users to the space available on screen.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Multi-Line Fields
Reply #1 - Jun 13th, 2005 at 9:33pm
Print Post Print Post  
You will want to double check that the element is multi line. One easy way to check is to hit enter while in that element. If you are moved down a line, then the element is multi-line. If you are moved to another element then you are not multi-line.

Sesame will wrap a multi-line text box at the closest space character to where it needs to wrap at the width of the box. If you type a big long word with no spaces in it then Sesame is not going to force it onto two lines or more.

You can use the on Element Immediate change event to grab only the first so many characters there by limiting the text box to that many characters. You will have to experiment to discover the number of characters that will fill your box.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Multi-Line Fields
Reply #2 - Jun 13th, 2005 at 9:49pm
Print Post Print Post  
Silly me !

When I was testing it, I was typing gibberish like this with no spaces:

ajjkadjkdjkaddajldajldajkldakldkldkldadkladakldkl

That explains it and I will try your suggestion for limiting the text.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Multi-Line Fields
Reply #3 - Jun 16th, 2005 at 9:46pm
Print Post Print Post  
Ray:

I was able to limit the text in the Multi-Line field by placing the following programming in my field on Element Immediate Change:

If @LEN(REMARKS) > 1350 then
{
     REMARKS = @LEFT(REMARKS,1350)
}

The field's dimensions are 180 (h) by 850 (w).

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Multi-Line Fields
Reply #4 - Jun 16th, 2005 at 10:12pm
Print Post Print Post  
I would suggest that you also include an audible and/or visible alert to the user to let them know the input has been truncated.  Prompt them to accept truncated value or to edit the contents.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Multi-Line Fields
Reply #5 - Jun 17th, 2005 at 6:53pm
Print Post Print Post  
Bob:

Thanks for the input.  This works like a charm.

My code now reads as follows:

If @LEN(REMARKS) > 1200 then
{
     REMARKS = @LEFT(REMARKS,1200)
     @MSGBOX("","Maximum amount of characters has been reached!","Remove any non-currrent information to add more remarks!")
}

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged