summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cd5e95)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46264
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; }
// parts of our virtual functions reused by the derived classes
wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; }
// parts of our virtual functions reused by the derived classes
+ void DoCreate(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler,
+ long style = 0);
void DoBeginEdit(const wxString& startValue);
void DoReset(const wxString& startValue);
void DoBeginEdit(const wxString& startValue);
void DoReset(const wxString& startValue);
wxWindowID id,
wxEvtHandler* evtHandler)
{
wxWindowID id,
wxEvtHandler* evtHandler)
{
- m_control = new wxTextCtrl(parent, id, wxEmptyString,
- wxDefaultPosition, wxDefaultSize
+ DoCreate(parent, id, evtHandler);
+}
+
+void wxGridCellTextEditor::DoCreate(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler,
+ long style)
+{
- ,
- wxTE_PROCESS_ENTER |
- wxTE_PROCESS_TAB |
- wxTE_AUTO_SCROLL |
- wxNO_BORDER
+ style |= wxTE_PROCESS_ENTER |
+ wxTE_PROCESS_TAB |
+ wxTE_AUTO_SCROLL |
+ wxNO_BORDER;
+
+ m_control = new wxTextCtrl(parent, id, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ style);
// set max length allowed in the textctrl, if the parameter was set
// set max length allowed in the textctrl, if the parameter was set
- ((wxTextCtrl*)m_control)->SetMaxLength(m_maxChars);
+ Text()->SetMaxLength(m_maxChars);
}
wxGridCellEditor::Create(parent, id, evtHandler);
}
wxGridCellEditor::Create(parent, id, evtHandler);
wxWindowID id,
wxEvtHandler* evtHandler)
{
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);