Home > Archive > C# > August 2004 > Using DrawString with limit horizontal space (print)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using DrawString with limit horizontal space (print)
|
|
| Gabriel van der Kruijk 2004-08-05, 9:06 am |
| Hi All,
I'm trying to create some document for a POS printer (cash receipt), but
some of the names of the products are to long, I would like them to be
wrapped over multiple lines. But, I want it to happen dynamicly, so I should
fit in a horizontal space and should grow as big as needed in vertical size
to fit the string I'm drawing.
Is there anyone with some suggestion, pointers, sample to do this?
Thanks,
Gab
| |
| chris m 2004-08-09, 8:57 pm |
| you can do this by specifying a stringformat object and rectangle
structure for each call to drawstring. stringformat will allow you to
choose wordwrapping, clipping, etc. and the rectangle will define how
big of an area you want to constraint the output.
"Gabriel van der Kruijk" <gabrielnospamforme@alsonotfor_marti.nl> wrote in message news:<411227b2$0$728$58c7af7e@news.kabelfoon.nl>...
> Hi All,
>
> I'm trying to create some document for a POS printer (cash receipt), but
> some of the names of the products are to long, I would like them to be
> wrapped over multiple lines. But, I want it to happen dynamicly, so I should
> fit in a horizontal space and should grow as big as needed in vertical size
> to fit the string I'm drawing.
>
> Is there anyone with some suggestion, pointers, sample to do this?
>
> Thanks,
> Gab
|
|
|
|
|