I have a RichTextBox where part of the RichTextBox is Bold and the rest is not. If I do a SelectAll, the SelectionFont member doesn't get set.

Anyone know why?

In WordPad, with the identical Font and bolding set on part of the text, the SelectionFont appears to get set to the first font it finds in the selection...

I have a RichTextBox where part of the RichTextBox is Bold and the rest is not. If I do a SelectAll, the SelectionFont member doesn't get set.

Anyone know why?

In WordPad, with the identical Font and bolding set on part of the text, the SelectionFont appears to get set to the first font it finds in the selection...

Basically I found the answer here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.selectionfont.aspx

It said: If the current text selection has more than one font specified, this property is Nothing

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.