I have been playing with autosize and can not get it to work. the layout of the form is as so
tablelayout with 1 coloum and 2 rows. top row contains flowlayout panel with 5 buttons left to right like a menu
bottom row also contains a flowlayout panel that is empty.
the tablelayout is set to fill the whole form
both flowlayout panels are set to fill there sections of the tablelayout
when button1 is pressed a second form gets added to the second flowlayoutpanel (in the bottom row) now no matter what i do or what settings/properties i change the second form never fills the whole flowlayout panel, it stays its original size.
i have manaully set all to autosize and dock settings, see below
this is the code behind the button.
Form1.TopLevel = False
Form1.Dock = DockStyle.Fill
Form1.AutoSize = True
Form1.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
please help. i dont know why its not working.
ps i have tested with message boxes that the flowlayout panels are growing just not the form. i have also tried setting the forms height and width = the flowlayout panel upon the panels size changed event to no luck