Font property of richtextbox
How to change the font property of richtextbox. Can anyone help me. Thanks in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Sep 2, 2009, 9:25 PM EDT
FontStyle newFontStyle = (FontStyle)(currentFont.Style | FontStyle.Bold);
richTextBox1.SelectionFont = new Font(currentFont.FontFamily, 7, newFontStyle);
Kirtan PatelRank #292 · 8.6K reputationPosted Sep 2, 2009, 7:38 AM EDT
dont forget to mark "Do you like answer" please it will give me some credits :)
private void button3_Click(object sender, EventArgs e)
{
//Setting Font Face m Font Size , Font Bold
richTextBox1.Font = new Font("Arial", 15, FontStyle.Bold);
}
Master BillaRank #2,229 · 630 reputationPosted Sep 2, 2009, 6:58 PM EDT
private void btnchange_Click(object sender, EventArgs e)
{
richTextBox1.Font = new Font("verdana", 12, FontStyle.normal);
}
thank you
mohammed mahmoud12 reputationPosted Sep 6, 2009, 5:40 AM EDT
in the button_click event
private void button1_Click(object sender, EventArgs e)
{
if (fnt.ShowDialog() == DialogResult.OK)
{
richTextBox1.Font = fnt.Font;
}
}
and if u want to select text from richTextbox and change it , use this after select the text u want
private void button1_Click(object sender, EventArgs e)
{
if (fnt.ShowDialog() == DialogResult.OK)
{
richTextBox1.SelectionFont = fnt.Font;
}
}