]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grideditors.cpp
Added missing wxBitmapComboBox::Insert() implementation
[wxWidgets.git] / src / generic / grideditors.cpp
index d764a71e09c5d66390d79c5d970702940a8560ef..6574ed6cb839ff6842abef644b9173d652041b99 100644 (file)
     #include "wx/textctrl.h"
     #include "wx/checkbox.h"
     #include "wx/combobox.h"
-    #include "wx/valtext.h"
     #include "wx/intl.h"
     #include "wx/math.h"
     #include "wx/listbox.h"
 #endif
 
+#include "wx/valnum.h"
 #include "wx/textfile.h"
 #include "wx/spinctrl.h"
 #include "wx/tokenzr.h"
@@ -355,7 +355,7 @@ bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event)
         return false;
 
 #if wxUSE_UNICODE
-    if ( event.GetUnicodeKey() == WXK_NONE )
+    if ( static_cast<int>(event.GetUnicodeKey()) == WXK_NONE )
         return false;
 #else
     if ( event.GetKeyCode() > WXK_START )
@@ -547,7 +547,7 @@ void wxGridCellTextEditor::StartingKey(wxKeyEvent& event)
     // a valid character, so not a whole lot of testing needs to be done.
 
     wxTextCtrl* tc = Text();
-    wxChar ch;
+    int ch;
 
     bool isPrintable;
 
@@ -558,7 +558,7 @@ void wxGridCellTextEditor::StartingKey(wxKeyEvent& event)
     else
 #endif // wxUSE_UNICODE
     {
-        ch = (wxChar)event.GetKeyCode();
+        ch = event.GetKeyCode();
         isPrintable = ch >= WXK_SPACE && ch < WXK_START;
     }
 
@@ -579,7 +579,7 @@ void wxGridCellTextEditor::StartingKey(wxKeyEvent& event)
 
         default:
             if ( isPrintable )
-                tc->WriteText(ch);
+                tc->WriteText(static_cast<wxChar>(ch));
             break;
     }
 }
@@ -660,7 +660,7 @@ void wxGridCellNumberEditor::Create(wxWindow* parent,
         wxGridCellTextEditor::Create(parent, id, evtHandler);
 
 #if wxUSE_VALIDATORS
-        Text()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
+        Text()->SetValidator(wxIntegerValidator<int>());
 #endif
     }
 }
@@ -875,7 +875,7 @@ void wxGridCellFloatEditor::Create(wxWindow* parent,
     wxGridCellTextEditor::Create(parent, id, evtHandler);
 
 #if wxUSE_VALIDATORS
-    Text()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
+    Text()->SetValidator(wxFloatingPointValidator<double>(m_precision));
 #endif
 }
 
@@ -1506,7 +1506,6 @@ void wxGridCellEnumEditor::BeginEdit(int row, int col, wxGrid* grid)
     }
 
     Combo()->SetSelection(m_index);
-    Combo()->SetInsertionPointEnd();
     Combo()->SetFocus();
 
 }