When autosizing a row or column (AutoSize____), use GetMultiLineTextExtent to determine header size. Otherwise, the column header widths are artificially inflated, and row header heights are not high enough.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10384,12 +10384,12 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
|
|||||||
|
|
||||||
if ( column )
|
if ( column )
|
||||||
{
|
{
|
||||||
dc.GetTextExtent( GetColLabelValue(col), &w, &h );
|
dc.GetMultiLineTextExtent( GetColLabelValue(col), &w, &h );
|
||||||
if ( GetColLabelTextOrientation() == wxVERTICAL )
|
if ( GetColLabelTextOrientation() == wxVERTICAL )
|
||||||
w = h;
|
w = h;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dc.GetTextExtent( GetRowLabelValue(row), &w, &h );
|
dc.GetMultiLineTextExtent( GetRowLabelValue(row), &w, &h );
|
||||||
|
|
||||||
extent = column ? w : h;
|
extent = column ? w : h;
|
||||||
if ( extent > extentMax )
|
if ( extent > extentMax )
|
||||||
|
Reference in New Issue
Block a user