This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Description
Hi bro. I was learning from your project, and I found a bug while increasing the font size from the increaseStripButton_Click().
Solution:
private void increaseStripButton_Click(object sender, EventArgs e)
{
try
{
int size = Convert.ToInt32(richTextBox1.SelectionFont.Size) + 1; // convert (fontSizeNum + 1)
if (richTextBox1.SelectionFont == null)
{
return;
}
// sets the updated font size
richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont.FontFamily
,size,richTextBox1.SelectionFont.Style);
fontSizeComboBox.Text = size.ToString(); // update font size
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "Error Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning); // show error message
}
}
Good luck!