From 4e8d95587c7fbd84af1238a818062704a53b4151 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 8 Nov 2006 18:51:03 +0000 Subject: [PATCH] Add ctor parameters to match wxTextCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/richtext/richtextctrl.h | 5 +++-- src/richtext/richtextctrl.cpp | 12 ++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/wx/richtext/richtextctrl.h b/include/wx/richtext/richtextctrl.h index 7e17b06b43..2c6d93de7a 100644 --- a/include/wx/richtext/richtextctrl.h +++ b/include/wx/richtext/richtextctrl.h @@ -95,14 +95,15 @@ public: wxRichTextCtrl( ); wxRichTextCtrl( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxRE_MULTILINE ); + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr); + virtual ~wxRichTextCtrl( ); // Operations /// Creation bool Create( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxRE_MULTILINE ); + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr ); /// Member initialisation void Init(); diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index f894b85f5c..bac9d50f61 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -109,18 +109,22 @@ wxRichTextCtrl::wxRichTextCtrl(wxWindow* parent, const wxString& value, const wxPoint& pos, const wxSize& size, - long style) + long style, + const wxValidator& validator, + const wxString& name) : wxScrollHelper(this) { Init(); - Create(parent, id, value, pos, size, style); + Create(parent, id, value, pos, size, style, validator, name); } /// Creation -bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style) +bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, + const wxValidator& validator, const wxString& name) { if (!wxTextCtrlBase::Create(parent, id, pos, size, - style|wxFULL_REPAINT_ON_RESIZE)) + style|wxFULL_REPAINT_ON_RESIZE, + validator, name)) return false; if (!GetFont().Ok()) -- 2.45.2