RichTextBox
using System;
using System.Drawing;
using System.Windows.Forms;
public class FontConstructor1 : Form
{
public FontConstructor1()
{
Size = new Size(350,200);
Font fnt = Font;
fnt = new Font(fnt, FontStyle.Bold | FontStyle.Italic);
Font = fnt;
RichTextBox rtxt = new RichTextBox();
rtxt.Text = "first line.\n" +
"This is a second line of text.";
rtxt.Text += "\nFont Name:\t" + Font.Name;
rtxt.Text += "\nFont Family:\t" + Font.FontFamily;
rtxt.Text += "\nFont Styles:\t" + Font.Style;
rtxt.Text += "\nFont Size:\t" + Font.Size;
rtxt.Text += "\nFont Height:\t" + Font.Height;
rtxt.Text += "\nFont Units:\t" + Font.Unit;
rtxt.Multiline = true;
rtxt.Dock = DockStyle.Fill;
rtxt.Parent = this;
}
static void Main()
{
Application.Run(new FontConstructor1());
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
|