Correctly determine best wxPropertyGrid width.

Improve wxPropertyGrid::DoGetBestSize() to correctly determine the window
width by using the sum of columns widths.

Also correct wxPropertyGridPageState::GetColumnFitWidth() to account for the
bitmaps.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-31 21:28:25 +00:00
parent a4dac1907b
commit 890defb4f3
2 changed files with 13 additions and 3 deletions

View File

@@ -768,8 +768,10 @@ int wxPropertyGridPageState::GetColumnFitWidth(wxClientDC& dc,
if ( col == 0 )
w += ( ((int)p->m_depth-1) * pg->m_subgroup_extramargin );
//
// TODO: Add bitmap support.
// account for the bitmap
if ( col == 1 )
w += p->GetImageOffset(pg->GetImageRect(p, -1).GetWidth());
w += (wxPG_XBEFORETEXT*2);