Finding Bold Text in RichTextbox

  • Thread starter Thread starter Tor Inge Rislaa
  • Start date Start date
T

Tor Inge Rislaa

Finding Bold Text (or other formatting attributes) in RichTextbox .



Is it possible to find and select bold text by code within the text of a
RichTextbox? What I want is to manipulate the text into HTML code. Replace
the Bold text with <b>This is the bold text</b> before I save it to an HTML
file.



TIRislaa
 
I would read the RTF code to find the bolding. There is a property to
either read the text or read the RTF code in a rich text box.

Each section of special text is preceded with a header that describes
the font, color, bold, italic, etc., and is followed by a space. When
the bold is turned off, or any other change in the text layout, there
is another header for the next section of text.

The bold value is "/b". Bold is turned off when the next header section
does not have a "/b" in the formatting string.

You have to read the data and keep track of semaphores for the text
properties that you want to track. Was it on, and now it's off, and the
like.

There may be a ".NET" way of doing it, but when I moved my project from
VB6 to .NET, I didn't have to change my old parsing code.

Hope the idea helps.
Shane
 
Am 29.03.2010 12:38, schrieb priya:
plz send me the code for this subject

Would you be so kind to quote what you are referring to if
the message is more than three years old? Thx.
 
Back
Top