solus Posted April 12, 2003 Posted April 12, 2003 How can i set a TextBox to show the last line when it's multi line? I'm trying to make it a kind of status window, so i enter "some text" into it, then later "some more text" and eventually it's got enough lines that the vertical scroll bar shows up, but it stays at the top instead of scrolling down to show the new line. I figure it's just a simple "scroll to line" or something, any input? I'm using c#. Quote Can't afford to be neutral on a moving train...
solus Posted April 12, 2003 Author Posted April 12, 2003 Oh and another thing, how can i make it so the text in the TextBox appears at the bottom instead of the top when there's only one line? Quote Can't afford to be neutral on a moving train...
Moderators Robby Posted April 12, 2003 Moderators Posted April 12, 2003 try this... 'Place the caret at the end of the textbox TextBox1.SelectionStart = TextBox1.Text.Length 'scroll to caret (as the method says) TextBox1.ScrollToCaret() 'all subsequent enties should be appended TextBox1.AppendText("Some additional text") Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.