locked
Formating richtextbox text size RRS feed

  • Question

  • Hi

    I'm using a richtextbox and all formating text code works fine.

    But, how can I change only textsize e.g from 10 to 20


    richTextBox1.SelectionFont = new Font("Arial", 16);
    


    works, but "Arial" should be the current textfont.

    Any help?
    Monday, December 7, 2009 12:13 PM

Answers

  • Hi,

    Could you try this code.

    richTextBox1.SelectionFont=new Font(richTextBox1.SelectionFont.FontFamily,20);
    • Proposed as answer by Geert van Horrik Wednesday, December 9, 2009 5:45 PM
    • Marked as answer by Jing0 Friday, December 11, 2009 9:07 AM
    Monday, December 7, 2009 1:16 PM