|
-
Apr 21st, 2004, 07:38 AM
#1
Thread Starter
Frenzied Member
How to pad strings correctly..
In my app im iterating through a collection of linteitem objects
These are very simple objects and are used to make lines for printing...
objects has two properties text and offset
text is the text to be printed and offset is the position from left marginal where the text is to begin. The printout will look something like this:
YUYYU OIUYOI OYUOY OUYUYOU
12we 9wewe iiiii232 wew
etc etc
As you notice I want the lines to match perfectly column-wise...
But how do I do this?? In the string I can only count characters, and characters differ in width, like "O" and "i"... and I don't have a font-object... only a string to work with...
How should I proceed?? I apply brush and font when I print the line to printer... But how should I line them up so I add enough space between them so it doesn't matter if the stirings are made of OOOO OOOO or iiiii iiiiii?
kind regards
Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|