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:
yet nothing happens as if textbox.lines property were read only , yet i receive no error still my textbox remains unchanged.VB Code:
private lineCount as integer = 0 private sub addLine(byval newline as string) dim i as integer if lineCount >= 20 for i = 0 to 20 pInfo.Lines(i)=pInfo.Lines(i+1) ' pInfo is my textbox next i pInfo.Lines(20)= newline 'newline is the string i pass to the sub containing new info i need to show. else pInfo.Lines(lineCount)=newline lineCount=lineCount+1 end if end sub
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.




Reply With Quote