]> git.saurik.com Git - wxWidgets.git/commitdiff
1. wxGridCellEditor::SetSize needs to use the wxSIZE_ALLOW_MINUS_ONE
authorRobin Dunn <robin@alldunn.com>
Tue, 22 Feb 2000 20:02:48 +0000 (20:02 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 22 Feb 2000 20:02:48 +0000 (20:02 +0000)
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

index 62f86554f9405205f49a4959124c9454b4a110c3..11300fd5c8663e51cd33912a287f62cbd1912646 100644 (file)
@@ -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_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 )
     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) )
 {
 
 void GridFrame::ToggleRowSizing( wxCommandEvent& WXUNUSED(ev) )
 {
-    grid->EnableDragRowSize( 
+    grid->EnableDragRowSize(
         GetMenuBar()->IsChecked( ID_TOGGLEROWSIZING ) );
 }
 
 
 void GridFrame::ToggleColSizing( wxCommandEvent& WXUNUSED(ev) )
 {
         GetMenuBar()->IsChecked( ID_TOGGLEROWSIZING ) );
 }
 
 
 void GridFrame::ToggleColSizing( wxCommandEvent& WXUNUSED(ev) )
 {
-    grid->EnableDragColSize( 
+    grid->EnableDragColSize(
         GetMenuBar()->IsChecked( ID_TOGGLECOLSIZING ) );
 }
 
         GetMenuBar()->IsChecked( ID_TOGGLECOLSIZING ) );
 }