X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a10ea8b13fd0851e71e6fa5ebbe5b93933be11e..9cce71a0f949c227c2c2ad53d700eca16af92cbe:/src/generic/gridctrl.cpp diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 1f1fd61273..e8da62f564 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -17,12 +17,14 @@ #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" // ---------------------------------------------------------------------------- @@ -31,7 +33,7 @@ #if wxUSE_DATETIME -// Enables a grid cell to display a formated date and or time +// Enables a grid cell to display a formatted date and or time wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat) { @@ -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