Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RichTextBox rtb = new RichTextBox();
- Font boldfont = new Font("Times New Roman", 10, FontStyle.Bold);
- rtb.Text = "sometext";
- rtb.SelectAll()
- rtb.SelectionFont = boldfont;
- rtb.SelectionIndent = 12;
- public static void Set(this RichTextBox rtb, Font font, string text)
- {
- rtb.Text = text;
- rtb.SelectAll();
- rtb.SelectionFont = font;
- rtb.SelectionIndent = 12;
- return rtb;
- }
- someRtb.Set(yourFont, "The Text").AndThenYouCanAddMoreAndCHainThem();
Add Comment
Please, Sign In to add comment