Results 1 to 5 of 5

Thread: [SOLVED] TextBox.Lines property

Threaded View

  1. #1

    Thread Starter
    Lively Member mindloop's Avatar
    Join Date
    Mar 2004
    Posts
    64

    Resolved [SOLVED] TextBox.Lines property

    Hey i am trying to simulate a console for my app so i'm using a textbox to show some output information.
    I am using following code for displaying info in the textbox:
    VB Code:
    1. private lineCount as integer = 0
    2. private sub addLine(byval newline as string)
    3. dim i as integer
    4. if lineCount >= 20
    5.    for i = 0 to 20
    6.       pInfo.Lines(i)=pInfo.Lines(i+1) ' pInfo is my textbox
    7.    next i
    8.    pInfo.Lines(20)= newline 'newline is the string i pass to the sub containing new info i need to show.
    9. else
    10.    pInfo.Lines(lineCount)=newline
    11.    lineCount=lineCount+1
    12. end if
    13. end sub
    yet nothing happens as if textbox.lines property were read only , yet i receive no error still my textbox remains unchanged.

    I initialised the textbox with property
    pInfo.Text = "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
    how should i approach this? i was so happy to have discovered .Lines property so i dont have to use string functions, but i feel like i'm missing something.
    Last edited by mindloop; Apr 21st, 2005 at 03:45 PM. Reason: SOLVED
    ehmm...

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