locked
plz help me......... RRS feed

  • Question

  • i m creating a project in vb.net 2008 in which i need to insert the text from a file in a rich text box in a single line
    I have done that successfully but the problem is since contents of file are large they go out of rtf box n the worst thing is no scroll bars are being displayed......
    i have tried changing scrollbars property but nothing happened.......
    kindly help me plz.....   
    Wednesday, January 7, 2009 10:29 PM

Answers

  • All you need to do is to rightclick the richtextbox and select properties.  From proprties set scrollbars = both.  Also, you can search your code to see if you are setting it programatically to RichTextBoxScrollBars.None.  If so, you just need to remove the line where you set the scrollbar = RichTextBoxScrollBars.None.

    If you have tried that already, you may need to resize your control to allow for the scrollbars to be displayed.

    Hope this helps,

    Analyst
    Thursday, January 8, 2009 6:50 PM

All replies

  • I assume you want help describing your problem so you can write a meaningful subject line.  Try "How to get RichTextBox word wrap with scroll bars".
    Wednesday, January 7, 2009 11:04 PM
  • Can you post your code so that we can take a look at it?
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, January 7, 2009 11:35 PM
  • All you need to do is to rightclick the richtextbox and select properties.  From proprties set scrollbars = both.  Also, you can search your code to see if you are setting it programatically to RichTextBoxScrollBars.None.  If so, you just need to remove the line where you set the scrollbar = RichTextBoxScrollBars.None.

    If you have tried that already, you may need to resize your control to allow for the scrollbars to be displayed.

    Hope this helps,

    Analyst
    Thursday, January 8, 2009 6:50 PM
  • Thank you All for your friendly help.

    Hi fireblade,

    Welcome to MSDN forums!

    Here is just some supplement:

    There are two raleted properties (ScrollBars and WordWrap) of RichTextBox to this issue.
    The default values are:
            RichTextBox1.ScrollBars = RichTextBoxScrollBars.Both
            RichTextBox1.WordWrap = True ' It makes horizontal scrollbar hidden.

    To make horizontal scrollbar displayed, you need to: 
    RichTextBox1.WordWrap = False


    Best regards,
    Martin Xie

    Wednesday, January 14, 2009 8:59 AM