I have an autoscrolling TableLayoutPanel to which I am dynamically adding rows. I would like for the height of each row to be 1/3 of the visible area of the TableLayoutPanel, i.e., the original height of the panel before it gets expanded on the addition of the 4th panel and autoscrolling kicks in. I could just calculate the height for reach row manually and set it as an absolute height, but the TableLayoutPanel could be resized. In that case I could handle the resized event and recalculate the absolute height of each row, but I'm wondering if there is a better way. Is there some way to specify the row height as a percentage of the visible panel area, or should I just go the manual calculation, absolute height route?
I ended up implementing what I needed in a top-down FlowLayoutPanel, anchored Top, Down, Left, and Right so that it resizes with the form. The first subpanel is added to the FlowLayoutPanel and assigned a width slightly less than the FLP's width. Every subsequent subpanel is given a Dock style of fill, so that its width automatically matches the first panel. Every panel is assigned a height of FLP.Height / 3 and I have a handler for the FLP's resize event to recalculate the height of the subpanels as necessary.
Thanks to everyone who commented and answered. I'm upvoting your answers since they will be helpful to others, just didn't solve my particular issue.