Re: DrawString - few font styls in the same row
- From: "Dave Sexton" <dave@jwa[remove.this]online.com>
- Date: Tue, 28 Nov 2006 11:18:01 -0500
Hi Gidi,
If you're using GDI or GDI+ to render text then there is no simple way,
AFAIK, but it can be done. I believe that you'll have to calculate the
position of each contiguous block of formatted text and render it, in-place.
The TextRenderer.DrawText (2.0 framework) and Graphics.DrawString methods
both accept Font parameters. You can specify any combination of FontStyle
flags when creating a Font (e.g., Bold, Italic, Strikeout, Underline).
A simpler approach to displaying formatted text is to use the RichTextBox
control with RTF or the WebBrowser control (2.0 framework) with HTML.
--
Dave Sexton
"Gidi" <shnapsi@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:E45BA926-0D91-421C-9209-FA26A5903793@xxxxxxxxxxxxxxxx
Hi,
Is it possible to draw string with few font styls, like in WORD (i.e. Bold
and Underline) at the same line, on the same text ?
and is it possible that part of the line will be bold and the other one
not ?
Thanks,
Gidi.
.
- Prev by Date: How to create an array of a certain type
- Next by Date: Re: int32 Vs Int
- Previous by thread: How to create an array of a certain type
- Next by thread: Need shared access to file in C and C#
- Index(es):
Relevant Pages
|
Loading