For some reason only adding a vertical scroll bar works with my code.
I can't seem to add BOTH a vertical and horizontal scroll bar.
private void textBox1_TextChanged(object sender, EventArgs e)
{
textBox1.ScrollBars = ScrollBars.Vertical;
}
you don't need to write a code for this. Just change the properties of textBox. For both scroll bars, if Multiline set to True, then set ScrollBars to Both and set WordWrap to False in properties. No need for writing code at all since this is for WinForms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With