
Textbox/label which add a new line and remove the last line
There isn't a control that explicitly does this but you can get the same
sort of functionality by using the following code in your textbox.keyup
event. It basically just checks to see if a newline was entered and then
gets all but the last line in the textbox and puts it back to the textbox.
If e.KeyValue = 13 Then
TextBox1.Text = TextBox1.Text.Substring(0,
TextBox1.Text.LastIndexOf(Microsoft.VisualBasic.ChrW(13)))
End If
Hope this helps,
Eric
Visual Basic Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Quote:
> Hi, do anyone know of there is, or how to make a
> textbox or label where you can specify the number of line's
> and when i add a new line (on top) it will drop the last line?
> It must be fast because it is for a debug vieuw with very-very much
> statements (It's for trace-ing)
> I would like to thank everyone who tries to help me