Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Wrapping

Status
Not open for further replies.

AidenMc

Programmer
Sep 19, 2002
58
GB
Hi all,
I've hit a brick wall with an issue and I was hoping maybe someone could help.
A client of ours wants to be able to enter in up to six lines of comments against a job ( this is no problem )
The client though wants word wrapping ie once you get to the end of a sentence if the word is not complete it goes on to the next line. I tried to do this using a memo field with an edit box and it works. The problem I have is when I go to print it, it does not output as the client would have typed it in on the entry screen.
Has anyone done anything like this before and if so how did you get around it

thanks,

Aiden
 
Aiden,

How are you doing the printing?

If you are using ? or @/SAY commands, you should first SET MEMOWIDTH to the width of the text as it is when it is edited. Then, use MLINES() to loop through, getting each line in turn, and then send the line to the printer.

However, it's easier if you are printing via a report. In that case, just set the width of the field in the report to the same as the width of the editable text (you might need a bit of trial and error to get it exactly right).

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Hi Aiden,

When you say "does not output as the client would have typed it in on the entry screen" what exactly do you mean? How are you trying to print this, and what are you getting?

Jim
 
Hi,

It can be difficult to match the size of the text box (on the report) to the width of the edit box on the form.

If it becomes a problem, I use a SERIES of text boxes on the report - each linked to a single line in the memofield.

Code:
MLine(MyTable.MyMemoField,MyLineNo)

Then all you need to do is make the text field on the report a bit wider than is LIKELY (can't be too accurate).


Regards

Griff
Keep [Smile]ing
 
Hi all,
Thanks for the suggestions, sorry I wasn't back on sooner. I am outputting to a report, so I will try a few of the ideas above and let you know how I get on ,

Thanks Again

Aiden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top