Fix scrollbar position in wxGrid and wxDataViewCtrl in wxUniv
Skip the event in wxEVT_SIZE handler in wxGrid and wxDataViewCtrl as it
was already done for wxListCtrl in 98c2eef619 (Fix scrollbar position in
wxListCtrl in wxUniv, 2021-09-05).
Closes #22145.
This commit is contained in:
parent
6d0f5ec591
commit
1d585eef05
2 changed files with 4 additions and 2 deletions
|
|
@ -5634,7 +5634,7 @@ wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size)
|
|||
return newsize;
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
void wxDataViewCtrl::OnSize(wxSizeEvent &event)
|
||||
{
|
||||
// We need to override OnSize so that our scrolled
|
||||
// window a) does call Layout() to use sizers for
|
||||
|
|
@ -5661,6 +5661,7 @@ void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
|||
{
|
||||
m_headerArea->Refresh();
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::OnDPIChanged(wxDPIChangedEvent& event)
|
||||
|
|
|
|||
|
|
@ -5746,12 +5746,13 @@ void wxGrid::RefreshBlock(int topRow, int leftCol,
|
|||
}
|
||||
}
|
||||
|
||||
void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
void wxGrid::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
if (m_targetWindow != this) // check whether initialisation has been done
|
||||
{
|
||||
// reposition our children windows
|
||||
CalcWindowSizes();
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue