[Mono-bugs] [Bug 354672] New: AutoSized rows and Columns not autosizing correctly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 18 03:34:05 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=354672


           Summary: AutoSized rows and Columns not autosizing correctly
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: albright at wesay.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


TableLayout is not autosizing rows and columns correctly when content is also
autosized and content is not dockstyle fill and not anchored top and bottom
(for rows) or anchered left and right (for columns).

Looks like replacing:
 if (c.Width + c.Margin.Left + c.Margin.Right > max_width)
    max_width = c.Width + c.Margin.Left + c.Margin.Right;                       

with:
 if (c.AutoSize)
    max_width = Math.Max(max_width, c.PreferredSize.Width +
c.Margin.Horizontal);
 else
    max_width = Math.Max(max_width, c.ExplicitBounds.Width +
c.Margin.Horizontal);      

should do the trick (along with the same for columns)


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list