WinForms anchoring tab control to window borders (should be easy!)

I have an application that consists of a window... and inside that window I have a tab control.  When I increase the size of or maximize the window, I'd like the tab control to resize along with the window instead of staying the size I initially set it at.  I got it working so that when I increase the size of the window, the tab control does increase with it (set the tab control's anchor property).  But then I can't shrink the window!  As if the tab control's size gets locked or something.  What's going on here?  Thanks!!
DiamonDogXAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Hi DiamonDogX,

Do you have any code that stop the the tab reducing its size? You should try to create a new form, place a tab control on it and set its anchor property. It should work properly. If it is, try to replace your tabcontrol on your original form. You might have changed a property inadvertly.

Cheers!
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
"As if the tab control's size gets locked or something."

Make sure you don't have a "MinimumSize" set for the TabControl or the Form itself.
0
 
DiamonDogXAuthor Commented:
Fixed it.  All I did was change the AutoSize property of the form to false.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.