Results 1 to 2 of 2

Thread: enumerate collection in RichTextBox

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    1

    print items in a collection to a RichTextBox

    How do I print the items in my collection in a RichTextBox. If I try to show the items in my collection in debug.print, all the items in my collection show. So I know I have the enumeration part set up correctly. If I try to use the same process in the RichTextBox, it loops through the collection, but the items write on top of each other so the only item showing is the last item in the collection. I have the MultiLine option set to true.

    [Edited by tspeiran on 03-20-2000 at 07:06 PM]

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    How are you putting text in the Rich text box?

    It looks like you might be going


    Code:
    for each varTemp in collOutput
    
        RichTextBox1.Text=varTemp
    
    Next varTemp
    If this is what you're doing try

    Code:
    for each varTemp in collOutput
    
        RichTextBox1.Text=RichTextBox1.Text & _
                          vbNewLine & _
                          varTemp
    
    Next varTemp
    Just in case you havn't seen the line continuation character, those _s at the end of the lines make vb carry on to the next line as if it was still on the same line.


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