TabControl.ClientSize doesn't resize Size

  • Thread starter Thread starter vooose
  • Start date Start date
V

vooose

Consider adding a TabPage with size=(300,300) to a TabControl, then
calling

tabControl.ClientSize=tabPage.Size;

You would think tabControl.Size must now be BIGGER than
tabControl.ClientSize to accomadate room for the tabs and borders. In
fact they are the same size!

Compare this to adding a Panel to a Form. Form.Size would be slightly
bigger than Form.ClientSize after you called

form.ClientSize=panel.Size;

Anyone know what's going on?
 
Something else:

Form form = new Form(); //ClientSize is less than Size

TabPage page = new TabPage(); //ClientSize equals Size

TabControl control = new TabControl(); //ClientSize equals Size

I am thinking TabPage is wrong in that ClientSize must be smaller at
least in height to accomadate for the tab name.
 
Back
Top