TextBox scrolling

  • Thread starter Thread starter Vanessa
  • Start date Start date
V

Vanessa

Is it possible to display text in a textBox
scrolled to the end, as and when it is displayed,
so the user always sees the last text first?

If so, please tell me how to do that.
 
Hi Vanessa

You can scroll to where the current Caret is so

// Move the caret to the end of the tex
1) myTextBox.SelectionStart = myTextBox.Text.Length

// Make a zero length selectio
2) myTextBox.SelectionLength = 0

// Scroll to make sure the caret is in vie
3) myTextBox.ScrollToCaret( )

HT

RS
 
// reading routine
{
// read(sometrhing)
}

textBox.Text=something;
textBox.ScrollToCaret( );

It doesn't scroll to the end.
 
Are you doing all three steps?

textBox.Text=something;

// Move the caret to the end of the text
textBox.SelectionStart = textBox.Text.Length;
// Make a zero length selection
textBox.SelectionLength = 0;

textBox.ScrollToCaret( );

RS
 
Well no, but now I am.
Thanks for the solution to my little problem!

(PocketNerd? You must have a lot of belly buttons! Or are you no calculating
machine? (Hope you can take a joke...))
 
Of course i can take a joke - would you call yourself a pocket nerd through choice ??
;-

Sorry, I don't understand the belly buttons thing thoug
:s
 
Back
Top