In my application, I have a feature that allows the user to change the bold/italic/underline styles of the text. However, I have noticed that when the user makes the text bold, it reverts the text to the default size and font and THEN makes it bold. Obviously this is undesired as it would then mean that the user would have to change the font and size of the text again, which is undesirable.
Currently, the code for making the text bold within my application's richtextbox is:
richTextBoxPrintCtrl1.SelectionFont = new System.Drawing.Font(richTextBoxPrintCtrl1.Font,
richTextBoxPrintCtrl1.SelectionFont.Style ^ FontStyle.Bold);
Where am I going wrong? It does make the text bold, but it reverts the text back to the default size and font... However, the colour is unaffected.