How to change the font in the RichTextBox?

0

I would like to know how do I edit the font and color of a RichTextBox word in C # and if possible how do I number the rows.

    
asked by anonymous 23.07.2014 / 00:48

1 answer

1

To open a dialog (Dialog) where you can choose the font, you can add a component / object of type FontDialog to your form. Suppose the object name of type FontDialog is called fontDialog1 , so you can do something similar:

/*Se esta condição é verdadeira, quer dizer que o usuario clicou OK (escolheu uma font).*/
if(fontDialog1.ShowDialog() == DialogResult.OK)
{
    richTextBox1.Font = fontDialog1.Font;
}
    
23.07.2014 / 05:01