#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13

    Question how to display text files


    Hi all,

    I am new to VB. Please give me couple pointers.

    Is there object for displaying text file with scroll bar?

    Related questions would be how do I display multiple lines in the TextBox? Not wrap lines... actually two seperated lines. I know I can't do "\n".

    Thanks
    Help me, help you, help others...
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    The easiest way would be to put the text in a richtextbox control and use it.
    To get the scrollbars on it use it's "scrollbars" property.
    i.e.
    RichTextBox1.ScrollBars = rtfBoth

    To get line feeds instead of using "\n" use vbCrLf which is the vb constant for carriage return & line feed.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13
    Thank you Onslaught
    Help me, help you, help others...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Massachusetts
    Posts
    32
    Rep Power
    12
    vbCrLf!

    text1.text = "foo" & vbCrLf & "bar"

    there ya go
    User1: Is September 11th the first time the market ever bombed?
    Me: ... *slaps user1* great depression, idiot.
    User1: What was that?
    Join Darkscape!



IMN logo majestic logo threadwatch logo seochat tools logo