I have a simple TextBox control that is bound to a string property in an instance of a type. Like so:
textbox.DataBindings.Add(new Binding("Text", m_Configuration, propertyName));
When the property in the instance is updated, it gets displayed in the TextBox. But, the cursor position in the TextBox stays at the beginning.
Is there a way to have it automatically be at the end of whatever text is there?
I know I could manually code the TextBox to reset its cursor position using ScrollToCaret(). But, that means, I would have to type this same code 30 different TextBox control.
Thanks!
If you do not want to code this behavior multiple times, why not inherit from TextBox and add the code. I think there is no other way than to do it like that.