Results 1 to 7 of 7

Thread: [RESOLVED] RichTextBox:Underline text

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Resolved [RESOLVED] RichTextBox:Underline text

    Dear All,

    I am using a RichTextBox. How can I make the text underline?
    software engineer

  2. #2
    Junior Member
    Join Date
    Jun 2007
    Posts
    26

    Re: RichTextBox:Underline text

    By GUI design: Go to the richTextBox properties then go to 'Font' click the (...) button and it'll open up a font dialog, just select underline.
    Programmatically:
    Code:
                richTextBox1.SelectAll();
                richTextBox1.SelectionFont = new Font("Microsoft Sans Serif", (float)8.25, FontStyle.Underline);

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: RichTextBox:Underline text

    or

    Code:
    myrtb.Font.Underline = true;
    or

    Code:
    myrtb.SelectionFont.Underline = true;

  4. #4
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: RichTextBox:Underline text

    @pen - both of those are readonly properties.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: RichTextBox:Underline text

    Well that's silly then.

  6. #6
    Junior Member
    Join Date
    Jun 2007
    Posts
    26

    Re: RichTextBox:Underline text

    Quote Originally Posted by sevenhalo
    @pen - both of those are readonly properties.
    Yep, you have to use my method.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Thumbs up Re: RichTextBox:Underline text

    Thanks gamesguru...
    software engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width