Fix repositioning editors for horizontally scrolled grid
Closes #18313.
This commit is contained in:
@@ -1786,6 +1786,7 @@ wxWindow* wxPropertyGrid::GetEditorControl() const
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
||||
{
|
||||
int secWid = 0;
|
||||
@@ -1827,6 +1828,32 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
||||
if ( m_wndEditor2 )
|
||||
m_wndEditor2->Refresh();
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
void wxPropertyGrid::CorrectEditorWidgetSizeX(int xPosChange, int widthChange)
|
||||
{
|
||||
if ( m_wndEditor2 )
|
||||
{
|
||||
// if width change occurred, move secondary wnd by that amount
|
||||
wxPoint p = m_wndEditor2->GetPosition();
|
||||
p.x += xPosChange + widthChange;
|
||||
m_wndEditor2->SetPosition(p);
|
||||
}
|
||||
|
||||
if ( m_wndEditor )
|
||||
{
|
||||
wxRect r = m_wndEditor->GetRect();
|
||||
r.x += xPosChange;
|
||||
|
||||
if ( !(m_iFlags & wxPG_FL_FIXED_WIDTH_EDITOR) )
|
||||
r.width += widthChange;
|
||||
|
||||
m_wndEditor->SetSize(r);
|
||||
}
|
||||
|
||||
if ( m_wndEditor2 )
|
||||
m_wndEditor2->Refresh();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user