diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp index d4244576a7..4eebd5fa09 100644 --- a/src/common/treebase.cpp +++ b/src/common/treebase.cpp @@ -113,6 +113,10 @@ wxGetBestTreeSize(const wxTreeCtrlBase* treeCtrl, wxTreeItemId id, wxSize& size) if ( treeCtrl->GetBoundingRect(id, rect, true /* just the item */) ) { + // Translate to logical position so we get the full extent + rect.x += treeCtrl->GetScrollPos(wxHORIZONTAL); + rect.y += treeCtrl->GetScrollPos(wxVERTICAL); + size.IncTo(wxSize(rect.GetRight(), rect.GetBottom())); }