Remove line from multiline textbox

  • Thread starter Thread starter Sale
  • Start date Start date
I don't think you can do this - the value of a text box (multiline or
not) is one long string. I'd be tempted to use a ListBox, which allows
for manipulation of individual items.

I suppose you could split the string in the text box using the \r\n
characters for a carriage return\newline, and delete the correct part -
but a ListBox would be a much more efficient solution.
 
Hi,

Sale said:
How can i remove specific line from the multiline textbox?

textbox1.Text = textbox1.Text.Remove( startIndex, length );

All you have to do is know where the line start and how big it's
 
Back
Top