Bug 18638 - TableLayoutPanel has some sizing problems
Summary: TableLayoutPanel has some sizing problems
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-03-28 12:50 UTC by Stephen McConnel
Modified: 2017-09-01 11:55 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
I'm attaching a test program that demonstrates the problem. The program works fine for Visual Studio 2010, but not for Mono 3.2.4 (or Mono 2.10.9 for that matter). (12.95 KB, application/zip)
2014-03-28 12:50 UTC, Stephen McConnel
Details
VS2010.output shows the result of size calculations when the program is run on Visual Studio 2010. (1.96 KB, application/octet-stream)
2014-03-28 12:52 UTC, Stephen McConnel
Details
Mono-3.2.4.output shows the result of size calculations when the program is run on Mono 3.2.4. (2.49 KB, application/octet-stream)
2014-03-28 12:53 UTC, Stephen McConnel
Details
I'm attaching a proposed patch that fixes this problem. (8.19 KB, patch)
2014-03-28 12:56 UTC, Stephen McConnel
Details
Here's a proposed patch that includes a new unit test. (15.05 KB, patch)
2014-04-02 18:11 UTC, Stephen McConnel
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 18638 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Stephen McConnel 2014-03-28 12:50:40 UTC
Created attachment 6429 [details]
I'm attaching a test program that demonstrates the problem.  The program works fine for Visual Studio 2010, but not for Mono 3.2.4 (or Mono 2.10.9 for that matter).

The sizing calculations in TableLayoutPanel.cs and TableLayout.cs are inconsistent.  TableLayoutPanel.cs doesn't take spans into account, and TableLayout.cs doesn't fully handle AutoSize TableLayoutPanel objects.
Comment 1 Stephen McConnel 2014-03-28 12:52:09 UTC
Created attachment 6430 [details]
VS2010.output shows the result of size calculations when the program is run on Visual Studio 2010.
Comment 2 Stephen McConnel 2014-03-28 12:53:07 UTC
Created attachment 6431 [details]
Mono-3.2.4.output shows the result of size calculations when the program is run on Mono 3.2.4.
Comment 3 Stephen McConnel 2014-03-28 12:56:23 UTC
Created attachment 6432 [details]
I'm attaching a proposed patch that fixes this problem.
Comment 4 Stephen McConnel 2014-04-02 18:11:55 UTC
Created attachment 6470 [details]
Here's a proposed patch that includes a new unit test.
Comment 5 Stephen McConnel 2014-04-03 19:44:30 UTC
I've submitted a pull request with my proposed fix.
Comment 6 Stephen McConnel 2014-04-09 17:09:56 UTC
I've submitted a pull request with my proposed fix.
(https://github.com/mono/mono/pull/980)