added wxHeaderCtrlSimple::GetBestFittingWidth() for even more automatic column resizing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -149,6 +149,19 @@ void wxHeaderCtrlSimple::RemoveSortIndicator()
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
wxHeaderCtrlSimple::UpdateColumnWidthToFit(unsigned int idx, int widthTitle)
|
||||
{
|
||||
const int widthContents = GetBestFittingWidth(idx);
|
||||
if ( widthContents == -1 )
|
||||
return false;
|
||||
|
||||
m_cols[idx].SetWidth(wxMax(widthContents, widthTitle));
|
||||
UpdateColumn(idx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// wxHeaderCtrlEvent implementation
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user