Added validator to generic date picker control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,8 +87,9 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxDatePickerCtrlNameStr)
|
const wxString& name = wxDatePickerCtrlNameStr)
|
||||||
: wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, name)
|
: wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,11 +30,12 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxDatePickerCtrlNameStr)
|
const wxString& name = wxDatePickerCtrlNameStr)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
(void)Create(parent, id, date, pos, size, style, name);
|
(void)Create(parent, id, date, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
@@ -43,6 +44,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxDatePickerCtrlNameStr);
|
const wxString& name = wxDatePickerCtrlNameStr);
|
||||||
|
|
||||||
// wxDatePickerCtrl methods
|
// wxDatePickerCtrl methods
|
||||||
|
@@ -92,6 +92,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !(style & wxDP_SPIN),
|
wxASSERT_MSG( !(style & wxDP_SPIN),
|
||||||
@@ -99,7 +100,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
|
|||||||
|
|
||||||
if ( !wxControl::Create(parent, id, pos, size,
|
if ( !wxControl::Create(parent, id, pos, size,
|
||||||
style | wxCLIP_CHILDREN | wxWANTS_CHARS,
|
style | wxCLIP_CHILDREN | wxWANTS_CHARS,
|
||||||
wxDefaultValidator, name) )
|
validator, name) )
|
||||||
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user