Fix creating wxPropertyGrid header when grid is horizontally scrolled
Horizontal scroll position of just created wxPGHeaderCtrl has to be the same as the scroll position of wxPropertyGrid.
This commit is contained in:
@@ -1354,6 +1354,10 @@ void wxPropertyGridManager::RecalculatePositions( int width, int height )
|
||||
if ( m_pHeaderCtrl && m_pHeaderCtrl->IsShown() )
|
||||
{
|
||||
m_pHeaderCtrl->SetSize(0, propgridY, width, wxDefaultCoord);
|
||||
// Sync horizontal scroll position with grid
|
||||
int x;
|
||||
m_pPropGrid->CalcScrolledPosition(0, 0, &x, NULL);
|
||||
m_pHeaderCtrl->ScrollWindow(x, 0);
|
||||
propgridY += m_pHeaderCtrl->GetSize().y;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user