Groups | Blog | Home
all groups > dotnet drawing api > september 2005 >

dotnet drawing api : Drawstring word-wrap


yogee
9/28/2005 11:20:01 PM
I am creating a program to print report where I have to draw grid. (I am not
using
Crystal Report as it's not free of cost). I am new to system.drawing class.
I want to draw a text string in a definite width but variable height
ractangle. I mean full text should come in ractangle with specified width. I
have seen this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/printwinforms.asp
article but it's not giving solution for that. Please somebody help.
Please ask me for clarification or details if you want.
Thank you,
Lloyd Dupont
10/3/2005 12:00:00 AM
I would look at the various Graphics.DrawString()
You could set a bounding rect and it will wrap if it don't have enough
space.


However forget about doing RichText drawing in GDI+

--
There are 10 kinds of people in this world. Those who understand binary and
those who don't.
[quoted text, click to view]

Lloyd Dupont
10/3/2005 12:00:00 AM
[quoted text, click to view]
uh?
what I mean is the method already exist in
System.Drawing.Graphics.DrawString()
what were you trying to say?

[quoted text, click to view]

yogee
10/3/2005 4:48:05 AM

It's best if we have anything like that...

[quoted text, click to view]
SharpCoderMP
10/3/2005 10:33:24 AM
i'm not sure what exacly do you need, but probably you may want to look
at Graphics.MeasureString(...) method.

[quoted text, click to view]
yogee
10/4/2005 12:42:01 AM
Oops !! Sorry Lloyd, I was referring "However forget about doing RichText
drawing in GDI+ "...
But no prob. this time. As I don't need it this time. But it's good if we
have something like that.
Thanks for your help
-yogee

[quoted text, click to view]
AddThis Social Bookmark Button