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
This commit is contained in:
Robin Dunn 2000-02-22 20:02:48 +00:00
parent ebaad2ccc7
commit ea179c7b4a

View 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_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 ) );
}