In a C# form, I have a panel anchored all sides, and inside, a textbox, anchored top/left/right.
When text gets loaded into the textbox, i want it to auto expand itself vertically so that I don’t need to scroll the textbox (scroll the panel at most, if there is more text that doesn’t fit the panel).
is there any way to do this with a textbox? (i’m not constrained to use this control so if there’s another control that fits the description, feel free to mention it)
I’ll assume this is a multi-line text box and that you’ll allow it to grow vertically. This code worked well:
You ought to do something reasonable when the text box is empty, like setting the MinimumSize property.