Problem with wxCalendarCtrl
Aleksander
olek at none.pl
Fri Nov 24 00:21:13 PST 2006
Hello,
I use wxCalendarCtrl (wxWidgets 2.6.3 - wxALL under MS Windows XP) which I
create in this way:
mCalendarCtrl = new wxCalendarCtrl(c_panel, ID_CALENDAR, wxDefaultDateTime,
wxDefaultPosition, wxDefaultSize, wxCAL_MONDAY_FIRST | wxCAL_SHOW_HOLIDAYS |
wxCAL_SHOW_SURROUNDING_WEEKS | wxCAL_SEQUENTIAL_MONTH_SELECTION);
and put into sizer:
cbox_sizer->Add(mCalendarCtrl, 0, wxALIGN_CENTER | wxEXPAND);
I noticed that buttons for changing months don't work. IMHO lines in
calctrl.cpp (method wxCalendarCtrl::HitTest) are wrong:
if ( wxRegion(m_leftArrowRect).Contains(pos_corr) == wxInRegion )
and
if ( wxRegion(m_rightArrowRect).Contains(pos_corr) == wxInRegion )
I think that this code should look like this:
if ( wxRegion(m_leftArrowRect).Contains(pos) == wxInRegion )
and
if ( wxRegion(m_rightArrowRect).Contains(pos) == wxInRegion )
I have tested it and it work.
Best regards,
Alexander
More information about the wx-users
mailing list