generate wxEVT_GRID_{COL,ROW}_SIZE events when the user double clicks the separating line too; do not generate these events if the size didn't really change (further improvements to grid events are possible and remain needed, see #10754)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-04-29 21:59:10 +00:00
parent b19bcdeb2b
commit 27bb2c8cb7
4 changed files with 87 additions and 86 deletions

View File

@@ -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();
}