Hi Drew,
Thanks for posting in this group.
It seems that .Net does not allow use to set linespacing property.
I think the only workaround is do the drawstring yourself. For example, you
should calculate the rectangle's width, then you should split your string
into several sectors.
For each string sector, you can use DrawString method to specify the
upper-left point of this string sector. This allows you to apply your
drawing logic.
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From:
dr******@yahoo.com (Drew)
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Subject: Line spacing and DrawString??
| Date: 4 Nov 2003 14:11:14 -0800
| Organization:
http://groups.google.com
| Lines: 10
| Message-ID: <f7**************************@posting.google.com >
| NNTP-Posting-Host: 63.118.229.125
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1067983875 16996 127.0.0.1 (4 Nov 2003
22:11:15 GMT)
| X-Complaints-To:
gr**********@google.com
| NNTP-Posting-Date: Tue, 4 Nov 2003 22:11:15 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnew s1.google.com!no
t-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196742
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I posted this to framework.drawing, but did not get any responses...
| Maybe here??
|
| I am drawing some text using DrawString() and using a bounding
| rectangle so that when the string is too long it wraps automatically.
| I want to decrease the amount of space between the lines. How would I
| go about changing the LineSpacing? The FontFamily has a read only
| property.
|
| Any ideas?
|