From ea179c7b4a2d880fadd5cae5f25a38c88174dde9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 22 Feb 2000 20:02:48 +0000 Subject: [PATCH] 1. wxGridCellEditor::SetSize needs to use the wxSIZE_ALLOW_MINUS_ONE flag otherwise the choice editor will not move to row 1, (the wxRect given has a -1 y value.) 2. I fixed wxGridCellChoiceEditor::BeginEdit to not only set the current value into the text field, but also to make it the current selection in the dropdown. 3. EndEdit was getting called twice for each cell when you leave it with the TAB or ENTER. I commented out a call to SaveEditControlValue in SetCurrentCell to take care of this. It shouldn't hurt anything since SaveEditControlValue is also called within the EnableCellEditControl(FALSE) which gets called next. If this causes no problems for anybody it can be removed entirely. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/newgrid/griddemo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/newgrid/griddemo.cpp b/samples/newgrid/griddemo.cpp index 62f86554f9..11300fd5c8 100644 --- a/samples/newgrid/griddemo.cpp +++ b/samples/newgrid/griddemo.cpp @@ -69,7 +69,7 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame ) EVT_MENU( ID_TOGGLECOLLABELS, GridFrame::ToggleColLabels ) EVT_MENU( ID_TOGGLEEDIT, GridFrame::ToggleEditing ) EVT_MENU( ID_TOGGLEROWSIZING, GridFrame::ToggleRowSizing ) - EVT_MENU( ID_TOGGLECOLSIZING, GridFrame::ToggleColSizing ) + EVT_MENU( ID_TOGGLECOLSIZING, GridFrame::ToggleColSizing ) EVT_MENU( ID_SETLABELCOLOUR, GridFrame::SetLabelColour ) EVT_MENU( ID_SETLABELTEXTCOLOUR, GridFrame::SetLabelTextColour ) EVT_MENU( ID_ROWLABELHORIZALIGN, GridFrame::SetRowLabelHorizAlignment ) @@ -299,14 +299,14 @@ void GridFrame::ToggleEditing( wxCommandEvent& WXUNUSED(ev) ) void GridFrame::ToggleRowSizing( wxCommandEvent& WXUNUSED(ev) ) { - grid->EnableDragRowSize( + grid->EnableDragRowSize( GetMenuBar()->IsChecked( ID_TOGGLEROWSIZING ) ); } void GridFrame::ToggleColSizing( wxCommandEvent& WXUNUSED(ev) ) { - grid->EnableDragColSize( + grid->EnableDragColSize( GetMenuBar()->IsChecked( ID_TOGGLECOLSIZING ) ); } -- 2.45.2