<HTML>
<HEAD>
<TITLE>Re: [EmData] InData CS4 - Controlling Line Location of Line Breaks</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi JP,<BR>
<BR>
On 2/16/09 9:39 AM, "Peter Fulton" <<a href="jpfulton248@comcast.net">jpfulton248@comcast.net</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>I’ve been trying to figure out how to control line breaks. See below for an attempt at a description of the problemo..<BR>
<BR>
JP Fulton.................................... 248/123-4567(¬)<BR>
1154 Street Name Rd(¬)<BR>
City, State Zip(¶)<BR>
<BR>
The only line that I have trouble with is the first… some of the names are much longer… The phone number is formatted with a right align tab (b/c the phone needs to be right aligned). When the name is too long it ends of pushing the phone to the next line and it ends up left aligned.<BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>To get the phone number flush right, you’ll need to a hard paragraph return instead of the soft return that you’re currently using for the name/phone number line. That way, you can make the phone number paragraph right-aligned. Doing this, and also using a non-breaking hyphen, should give you much better results.<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>If the name is too long it really needs to break like this.<BR>
<BR>
JP Donald(¬)<BR>
Bartholomew Fulton............... 248/123-4567(¬)<BR>
1154 Street Name Rd(¬)<BR>
City, State Zip(¶)<BR>
<BR>
Believe it or not, I have actually written a ridiculous amount of code that actually measured all of the characters of the alphabet in order to determine the length of the name. Each letter has it’s own value set into a variable. The prototype then calls the variables and adds them as they appear in the name. If the total is over a specified number (sum of value of width of letters), the line breaks. This has proven to be imperfect (line either doesn’t break or breaks unnecessarily) most likely due to variable width fonts that I may choose to use in other sections of this project or simply being a little off in my initial measurements.<BR>
<BR>
I know this is extremely detailed and an extremely specific request, but any help figuring out a method to make this work would be GREATLY appreciated.<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Controlling line breaks by counting characters can never be an exact science. Unfortunately, it is the best tool we have for doing what you’re after. And, if you’ve gone so far as to take character widths into account, you’ve taken it farther than I usually do. I’m guessing you’re setting your tolerances a bit too tight. Counting characters, it’s generally best to end up with a few un-necessary breaks so as to avoid breaks that don’t get made.<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Regards,<BR>
<BR>
Joe Mathia<BR>
Em Software Support / <a href="support@emsoftware.com">support@emsoftware.com</a> / www.emsoftware.com<BR>
(+1) 740 284 1010, fax (+1) 740 284 1210<BR>
<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'> <BR>
Thanks a mil,<BR>
<BR>
JP<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
Data-users mailing list<BR>
<a href="Data-users@emsoftware.com">Data-users@emsoftware.com</a><BR>
<a href="http://mail.emsoftware.com/mailman/listinfo/data-users">http://mail.emsoftware.com/mailman/listinfo/data-users</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>