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.
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.
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;
}