❔ Problems with applying multiple styles on text in RichTextBox
Im trying to apply some styles to a piece of text in a richTextBox and they just won't work properly. Here is an example: "BeamMP Description". I want to make the last 2 characters of the word "BeamMP" bold (MP) and the second word bold and underlined. So for the first word i do this: I set the
selectionStart
selectionStart
to 0 and the
selectionLength
selectionLength
to the end of the RTBox. Then this:
RTBox.SelectionFont = new Font(RTBox.SelectionFont, RTBox.SelectionFont.Style | FontStyle.Bold);
RTBox.SelectionFont = new Font(RTBox.SelectionFont, RTBox.SelectionFont.Style | FontStyle.Bold);
Similar way to underline the word "Description" But the problem here is that the bolding magically dissapears and only the underline at the word Description is applied???