]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Use kControlContentIconRef when recreating the tool for toggled state
[wxWidgets.git] / src / generic / grid.cpp
index 22939d4afc505c85c051a6d584651dd174f4fb4d..2fab29c85ccc76a2033ec514e9f80223e7e63f22 100644 (file)
@@ -627,7 +627,11 @@ void wxGridCellTextEditor::Create(wxWindow* parent,
     m_control = new wxTextCtrl(parent, id, wxEmptyString,
                                wxDefaultPosition, wxDefaultSize
 #if defined(__WXMSW__)
-                               , wxTE_PROCESS_TAB | wxTE_AUTO_SCROLL | wxNO_BORDER
+                               ,
+                               wxTE_PROCESS_ENTER |
+                               wxTE_PROCESS_TAB |
+                               wxTE_AUTO_SCROLL |
+                               wxNO_BORDER
 #endif
                               );
 
@@ -8309,7 +8313,8 @@ void wxGrid::ShowCellEditControl()
             // might not cover the entire cell
             wxClientDC dc( m_gridWin );
             PrepareDC( dc );
-            dc.SetBrush(wxBrush(GetCellAttr(row, col)->GetBackgroundColour(), wxSOLID));
+            wxGridCellAttr* attr = GetCellAttr(row, col);
+            dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
             dc.SetPen(*wxTRANSPARENT_PEN);
             dc.DrawRectangle(rect);
 
@@ -8329,7 +8334,6 @@ void wxGrid::ShowCellEditControl()
             if (rect.y > 0)
                 rect.y--;
 
-            wxGridCellAttr* attr = GetCellAttr(row, col);
             wxGridCellEditor* editor = attr->GetEditor(this, row, col);
             if ( !editor->IsCreated() )
             {