+
+ // draw column with calendar week nr
+ if ( HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) && IsExposed( 0, y, m_calendarWeekWidth, m_heightRow * 6 ))
+ {
+ dc.SetBackgroundMode(wxTRANSPARENT);
+ dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID));
+ dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID));
+ dc.DrawRectangle( 0, y, m_calendarWeekWidth, m_heightRow * 6 );
+ wxDateTime date = GetStartDate();
+ for ( size_t i = 0; i < 6; ++i )
+ {
+ const int weekNr = date.GetWeekOfYear();
+ wxString text = wxString::Format( wxT( "%d" ), weekNr );
+ dc.DrawText( text, m_calendarWeekWidth - dc.GetTextExtent( text ).GetWidth() - 2, y + m_heightRow * i );
+ date += wxDateSpan::Week();
+ }
+ }
+