From 807f503834e3451a8c355172cb8e90bb20a7ee7d Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 7 Feb 2005 18:37:43 +0000 Subject: [PATCH 1/1] Added validator to generic date picker control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/datectrl.h | 3 ++- include/wx/generic/datectrl.h | 4 +++- src/generic/datectlg.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/wx/datectrl.h b/include/wx/datectrl.h index 76a6ffb332..d868bead78 100644 --- a/include/wx/datectrl.h +++ b/include/wx/datectrl.h @@ -87,8 +87,9 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr) - : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, name) + : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name) { } diff --git a/include/wx/generic/datectrl.h b/include/wx/generic/datectrl.h index 701fce4ca7..eb761b9bd1 100644 --- a/include/wx/generic/datectrl.h +++ b/include/wx/generic/datectrl.h @@ -30,11 +30,12 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr) { Init(); - (void)Create(parent, id, date, pos, size, style, name); + (void)Create(parent, id, date, pos, size, style, validator, name); } bool Create(wxWindow *parent, @@ -43,6 +44,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr); // wxDatePickerCtrl methods diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 19c8a65e1a..4b9fdfeeb1 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -92,6 +92,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, + const wxValidator& validator, const wxString& name) { wxASSERT_MSG( !(style & wxDP_SPIN), @@ -99,7 +100,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent, if ( !wxControl::Create(parent, id, pos, size, style | wxCLIP_CHILDREN | wxWANTS_CHARS, - wxDefaultValidator, name) ) + validator, name) ) { return false; -- 2.45.2