X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82edfbe7d99a970b00ca37e5017ce74c3c9a37e0..bca8c756a30d54ee4fade96a091d78ad8988fd23:/include/wx/generic/private/grid.h diff --git a/include/wx/generic/private/grid.h b/include/wx/generic/private/grid.h index e8fc6ec037..d0a2844284 100644 --- a/include/wx/generic/private/grid.h +++ b/include/wx/generic/private/grid.h @@ -195,7 +195,12 @@ private: // as this is done by the user we should notify the main program about // it - GetOwner()->SendEvent(wxEVT_GRID_COL_SIZE, -1, idx); + + // make up a dummy event for the grid event to use -- unfortunately we + // can't do anything else here + wxMouseEvent e; + e.SetState(wxGetMouseState()); + GetOwner()->SendSizeEvent(wxEVT_GRID_COL_SIZE, -1, idx, e); } // overridden to react to the columns order changes in the customization @@ -226,7 +231,12 @@ private: void OnEndResize(wxHeaderCtrlEvent& event) { - GetOwner()->DoEndDragResizeCol(); + // we again need to pass a mouse event to be used for the grid event + // generation but we don't have it here so use a dummy one as in + // UpdateColumnVisibility() + wxMouseEvent e; + e.SetState(wxGetMouseState()); + GetOwner()->DoEndDragResizeCol(e); event.Skip(); }