If Not RichTextBox1.SelectionFont Is Nothing Thenĭim currentFont As = RichTextBox1.SelectionFontĭim newFontStyle As Below is the entire code for the three buttons (Bold, Italic, and Underline) Private Sub ItalicizedToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ItalicizedToolStripMenuItem.Click I have found other instances where it does not work, and the code still says that it should. NewFontStyle = FontStyle.Bold And FontStyle.Underline The lines of code thatĬorrespond to this instance are set up correctly: ElseIf = False And = False And = True Then one instance where it does not work is when the text is only bold, and then the 'underline' button is pressed, and the text goes to being unformatted. I have made some code for this but have a few instances where it does not work. I wish to have the fonts 'combine' so if the selected text it bold, and then I press the italicized button, it is supposed to make the text bold AND italicized. I have a word processor with a richtextbox, and I have bold, italic, and underline buttons.
0 Comments
Leave a Reply. |