Text font editor in c# Visual studio
Text Font Editor
To edit text style ,font,size
1-Add Richtextbox & Button.
2- copy and paste this code to the Button click event.
private void button1_Click(object sender, EventArgs e)
{
FontDialog dlg = new FontDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
string fontName;
float fontSize;
fontName = dlg.Font.Name;
fontSize = dlg.Font.Size;
richTextBox1.Font = dlg.Font;
}
}
To edit text style ,font,size
1-Add Richtextbox & Button.
2- copy and paste this code to the Button click event.
private void button1_Click(object sender, EventArgs e)
{
FontDialog dlg = new FontDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
string fontName;
float fontSize;
fontName = dlg.Font.Name;
fontSize = dlg.Font.Size;
richTextBox1.Font = dlg.Font;
}
}
Comments
Post a Comment