]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridctrl.cpp
fix bug with adding entries to a root group containing only subgroups (as shown by...
[wxWidgets.git] / src / generic / gridctrl.cpp
index 124606e4acf689bb32296f2583bca1c4d4cc1e35..e8da62f5646114d32e8b766d8fcc3ba95155833d 100644 (file)
 
 #if wxUSE_GRID
 
+#include "wx/generic/gridctrl.h"
+
 #ifndef WX_PRECOMP
     #include "wx/textctrl.h"
     #include "wx/dc.h"
+    #include "wx/combobox.h"
 #endif // WX_PRECOMP
 
-#include "wx/generic/gridctrl.h"
 #include "wx/tokenzr.h"
 
 // ----------------------------------------------------------------------------
@@ -74,7 +76,7 @@ wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int
     if (!hasDatetime )
     {
         text = table->GetValue(row, col);
-        hasDatetime = (val.ParseFormat( text, m_iformat, m_dateDef ) != (wxChar *)NULL) ;
+        hasDatetime = (val.ParseFormat(text.c_str(), m_iformat, m_dateDef) != (wxChar *)NULL) ;
     }
 
     if ( hasDatetime )
@@ -290,12 +292,8 @@ wxGridCellAutoWrapStringEditor::Create(wxWindow* parent,
                                        wxWindowID id,
                                        wxEvtHandler* evtHandler)
 {
-  m_control = new wxTextCtrl(parent, id, wxEmptyString,
-                             wxDefaultPosition, wxDefaultSize,
-                             wxTE_MULTILINE | wxTE_RICH);
-
-
-  wxGridCellEditor::Create(parent, id, evtHandler);
+  wxGridCellTextEditor::DoCreate(parent, id, evtHandler,
+                                 wxTE_MULTILINE | wxTE_RICH);
 }
 
 void