From e32ddbaae59323831700c5de0473863b143d7455 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Mar 2000 15:15:35 +0000 Subject: [PATCH] temp ugly hack around the bug under GTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/calendar/calendar.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/samples/calendar/calendar.cpp b/samples/calendar/calendar.cpp index d029c165fd..50a42c800f 100644 --- a/samples/calendar/calendar.cpp +++ b/samples/calendar/calendar.cpp @@ -299,6 +299,9 @@ void MyFrame::OnAllowYearUpdate(wxUpdateUIEvent& event) MyPanel::MyPanel(wxFrame *frame) : wxPanel(frame, -1) { + // using constraints doesn't work under GTK - the calendar window is never + // repainted after it had been moved at least once! +#if 0 SetAutoLayout(TRUE); wxString date; @@ -328,6 +331,19 @@ MyPanel::MyPanel(wxFrame *frame) c->width.AsIs(); m_calendar->SetConstraints(c); +#else + wxString date; + date.Printf("Selected date: %s", + wxDateTime::Today().FormatISODate().c_str()); + m_date = new wxStaticText(this, -1, date, wxPoint(10, 100)); + m_calendar = new wxCalendarCtrl(this, Calendar_CalCtrl, + wxDefaultDateTime, + wxPoint(200, 20), + wxDefaultSize, + wxCAL_MONDAY_FIRST | + wxCAL_SHOW_HOLIDAYS | + wxRAISED_BORDER); +#endif } void MyPanel::OnCalendar(wxCalendarEvent& event) -- 2.45.2