G
Guest
One more for today....
As I add more and more lines to my RichTextBox the array that holds its
strings gets bigger and bigger and the vertical scroll bar gets smaller and
smaller until the string array finally runs out of memory. I'd like to set
some line limit and once that limit is reached, start removing the first line
each time a new line is appended onto the end. I think this is probably more
of an array manipulation question than a text box question (but maybe not).
Is there a simple way to remove the first element or do I manually need to
simply rewrite the entire array each time a new line comes in? I also have a
feeling this might cause massive screen flashing, but at least you'll know
it's doing something! Is there a better way?
Thanks,
Ray
As I add more and more lines to my RichTextBox the array that holds its
strings gets bigger and bigger and the vertical scroll bar gets smaller and
smaller until the string array finally runs out of memory. I'd like to set
some line limit and once that limit is reached, start removing the first line
each time a new line is appended onto the end. I think this is probably more
of an array manipulation question than a text box question (but maybe not).
Is there a simple way to remove the first element or do I manually need to
simply rewrite the entire array each time a new line comes in? I also have a
feeling this might cause massive screen flashing, but at least you'll know
it's doing something! Is there a better way?
Thanks,
Ray