<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, &quot;Peter Fulton&quot; &lt;<a href="jpfulton248@comcast.net">jpfulton248@comcast.net</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>I&#8217;ve been trying to figure out how to control line breaks. See below for an attempt at a description of the problemo..<BR>
&nbsp;<BR>
JP Fulton.................................... 248/123-4567(&not;)<BR>
1154 Street Name Rd(&not;)<BR>
City, State Zip(&para;)<BR>
&nbsp;<BR>
The only line that I have trouble with is the first&#8230; some of the names are much longer&#8230; 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>
&nbsp;<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&#8217;ll need to a hard paragraph return instead of the soft return that you&#8217;re currently using for the name/phone number line. &nbsp;That way, you can make the phone number paragraph right-aligned. &nbsp;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>
&nbsp;<BR>
JP Donald(&not;)<BR>
Bartholomew Fulton............... 248/123-4567(&not;)<BR>
1154 Street Name Rd(&not;)<BR>
City, State Zip(&para;)<BR>
&nbsp;<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&#8217;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&#8217;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>
&nbsp;<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. &nbsp;Unfortunately, it is the best tool we have for doing what you&#8217;re after. &nbsp;And, if you&#8217;ve gone so far as to take character widths into account, you&#8217;ve taken it farther than I usually do. &nbsp;I&#8217;m guessing you&#8217;re setting your tolerances a bit too tight. &nbsp;Counting characters, it&#8217;s generally best to end up with a few un-necessary breaks so as to avoid breaks that don&#8217;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>
&nbsp;<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>