This issue was reported to Microsoft in 2005, and they acknowledge it's a bug, but they were "still evaluating our options here"
TableLayoutPanel Rows and RowStyles do not correspond.
Description
When you create a tableLayoutPanel,
and new rows are created (either by
adding rows in the program or setting
the RowCount property), new RowStyles
are not added to the control.
Additionally, if I add new Row Styles,
the number of rows is increased, but
not to the same number: if I start
with two Rows and two RowStyles, set
Rowcount to 4, and then add two
RowStyles (in design view), the
Rowcount has set to 6. It seems more
intuitive for the ordinality of the
RowStyles collection to match the
current RowCount.
Comments
Posted by Microsoft on 6/27/2005 at 6:49 AM
The Microsoft Sub-status is now
"Reproduced"
Thanks for reporting this bug, we have
been able to repro this issue and are
investigating.
Thank you, Prabhu, VS2005 Product
Team.
Posted by Microsoft on 6/27/2005 at 5:55 PM
Thankyou for reporting this issue.
This is a peculiarity in our runtime
object model that doesn't translate
well to design time. At runtime the
RowCount and ColCount really mean
minRowCount and minColCount in terms
of autogrow, because rows/cols don't
need a supporting style. At design
time we try to simplify that and keep
a near 1:1 correspondence between
styles and rows/cols. In this case,
you are seeing by design runtime
behavior. We already have a bug
tracking this issue and are still
evaluating our options here. Thanks
again for contributing to a better
Whidbey.
Posted by Microsoft on 7/6/2005 at 3:43 PM
Thankyou for
reporting this issue. This is a
peculiarity in our runtime object
model that we have chosen to not
address at design time. At runtime the
RowCount and ColCount really mean
minRowCount and minColCount in terms
of autogrow, because rows/cols don't
require a supporting style. At design
time we generally try to simplify that
and keep a near 1:1 correspondence
between styles and rows/cols. In the
case of rowSpan or colSpan on a table
layot panel with autogrow you can get
into a state where
rows/rowcount/rowstyles are out of
sync. To avoid this, simply add the
columns/rows you need first, then set
the controls *span property. Thanks.
Posted by Microsoft on 10/24/2005 at 6:07 PM
This issue has been reactivated as we
begin planning for the next version of
Visual Studio. Over the coming months
we will reconsider feedback that was
previously postponed. We welcome your
comments and participation in this
process.
-- Visual Studio Team