CrestGraphics Posted April 3, 2013 Share Posted April 3, 2013 http://imageshack.us/photo/my-images/811/screenshot20130403at806.png/ Working on setting up some business cards. Some of the records have an OfficePhone entry, some have a CellPhone entry, some have both, etc. We made the words "Office" and "Mobile" part of the data (easy fix to make sure they suppressed automatically). The customer wants the plus-signs to line up vertically. is there a way to change the gap between "Office" and "+" without changing the spacing anywhere else? This is how the data reads: OfficePhone CellPhone "Office +1 513 204 6219" "Mobile +1 513 312 0994" Not sure if it's possible, but you never know. Thank you! Quote Link to comment Share on other sites More sharing options...
step Posted April 3, 2013 Share Posted April 3, 2013 Sounds like you could use a table to line up everything. I don't know what font and what font size you're using so I didn't mess with the column widths too much but I've commented out beside what you'd need to change to get the table to fit your text. This should get you started: var numbers = [Field("Office"),Field("Mobile")]; // Your field names numbers = numbers.filter(String); new FPTable; var myTable = new FPTable; myTable.AddColumns(4800, 2000, 14400); // Column 1, 2, & 3 width respectively. 1in = 7200 myTable.AddRows(numbers.length); for (var i=0; i<numbers.length; i++){ myTable.Rows[i].SetContents(numbers[i].split("+")[0], "+", numbers[i].split("+")[1]); } return myTable.MakeTags(); Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 3, 2013 Share Posted April 3, 2013 A table is probably the best solution, although you could try using a tab stop aligned to the "+" character. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.