• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3334
  • Last Modified:

How to auto resize textbox and a windows form

I have a windows form with a multiline textbox on it. I want textbox to auto grow and expand downwards (the width should not be affected) as the user types in more text, and I want to windows form to grow correspondingly.

Does anyone know how can I accomplish that?
0
YZlat
Asked:
YZlat
  • 2
  • 2
2 Solutions
 
Julian HansenCommented:
0
 
YZlatAuthor Commented:
julianH, the code I got from that link worked great on the textbox but the question remains of how can I make the form grow along with the textbox?
0
 
Julian HansenCommented:
Have you set the forms AutoSize property to true?
0
 
YZlatAuthor Commented:
I just tried that and it worked if the textbox is not docked to fill the form. But in my case textbox is docked to fill the form. I had to set Dock to none and now looks like it works. thank you!

Hopefully it won't break something else that I had to un-dock the form
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now