Hi Fergus.
I am trying to fit within a rectangle ... but some lines need to wrap (to 2
or 3 lines) and some lines of text need to strictly truncate.
Typical addresee block that needs to fit in the see-through window of an
envelope. I wrote all the code to do it, but it was completely custom code.
I thought maybe something useful was built-into the class lib.
"Fergus Cooney" <fi*****@post.com> wrote in message
news:e8**************@tk2msftngp13.phx.gbl...
Hi John,
You'd think so - two other people have wanted the same routine in the
last month.- but string handling for text editing is only so good.
It's there in drawing terms - DrawString can fit a string within a
given rectangle, splitting the text as required.
You can fiddle it using a RichTextBox- use a fixed-width font and set
the rtb width so big. Then assign your string to the Text property and read
the result back out from the Lines() array.
But simple plain, string routines ? Nope!
What else did you have in mind?
Regards,
Fergus