fix for wxCalendarCtrl::Create() (bug 458167)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-09-30 14:46:30 +00:00
parent 08b6f23906
commit 4965c3d7f6
2 changed files with 12 additions and 8 deletions

View File

@@ -42,10 +42,8 @@ public:
const wxDateTime& date = wxDefaultDateTime, const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
const wxString& name = wxCalendarNameStr) const wxString& name = wxCalendarNameStr)
: wxControl(parent, id, pos, size,
style | wxWANTS_CHARS, wxDefaultValidator, name)
{ {
Init(); Init();
@@ -57,7 +55,7 @@ public:
const wxDateTime& date = wxDefaultDateTime, const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
const wxString& name = wxCalendarNameStr); const wxString& name = wxCalendarNameStr);
virtual ~wxCalendarCtrl(); virtual ~wxCalendarCtrl();

View File

@@ -180,14 +180,20 @@ void wxCalendarCtrl::Init()
m_colHeaderBg = *wxLIGHT_GREY; m_colHeaderBg = *wxLIGHT_GREY;
} }
bool wxCalendarCtrl::Create(wxWindow * WXUNUSED(parent), bool wxCalendarCtrl::Create(wxWindow *parent,
wxWindowID WXUNUSED(id), wxWindowID id,
const wxDateTime& date, const wxDateTime& date,
const wxPoint& WXUNUSED(pos), const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& WXUNUSED(name)) const wxString& name)
{ {
if ( !wxControl::Create(parent, id, pos, size,
style | wxWANTS_CHARS, wxDefaultValidator, name) )
{
return FALSE;
}
// needed to get the arrow keys normally used for the dialog navigation // needed to get the arrow keys normally used for the dialog navigation
SetWindowStyle(style | wxWANTS_CHARS); SetWindowStyle(style | wxWANTS_CHARS);