]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/calctrl.cpp
fixed bugs with setting the client size when the difference between the total and...
[wxWidgets.git] / src / generic / calctrl.cpp
index e6341247b39aa1b4468dec9d93aeb73ea56b5408..79943136ecdc6584d6c9b39a7018173135059bed 100644 (file)
@@ -121,7 +121,7 @@ wxMonthComboBox::wxMonthComboBox(wxCalendarCtrl *cal)
                             wxDefaultPosition,
                             wxDefaultSize,
                             0, NULL,
                             wxDefaultPosition,
                             wxDefaultSize,
                             0, NULL,
-                            wxCB_READONLY)
+                            wxCB_READONLY | wxCLIP_SIBLINGS)
 {
     m_cal = cal;
 
 {
     m_cal = cal;
 
@@ -140,7 +140,7 @@ wxYearSpinCtrl::wxYearSpinCtrl(wxCalendarCtrl *cal)
                            cal->GetDate().Format(_T("%Y")),
                            wxDefaultPosition,
                            wxDefaultSize,
                            cal->GetDate().Format(_T("%Y")),
                            wxDefaultPosition,
                            wxDefaultSize,
-                           wxSP_ARROW_KEYS,
+                           wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
                            -4300, 10000, cal->GetDate().GetYear())
 {
     m_cal = cal;
                            -4300, 10000, cal->GetDate().GetYear())
 {
     m_cal = cal;
@@ -189,7 +189,8 @@ bool wxCalendarCtrl::Create(wxWindow *parent,
                             const wxString& name)
 {
     if ( !wxControl::Create(parent, id, pos, size,
                             const wxString& name)
 {
     if ( !wxControl::Create(parent, id, pos, size,
-                            style | wxWANTS_CHARS, wxDefaultValidator, name) )
+                            style | wxCLIP_CHILDREN | wxWANTS_CHARS,
+                            wxDefaultValidator, name) )
     {
         return FALSE;
     }
     {
         return FALSE;
     }
@@ -824,7 +825,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
 
         // Get extent of month-name + year
         wxCoord monthw, monthh;
 
         // Get extent of month-name + year
         wxCoord monthw, monthh;
-        wxString headertext = m_date.Format("%B %Y");
+        wxString headertext = m_date.Format(wxT("%B %Y"));
         dc.GetTextExtent(headertext, &monthw, &monthh);
 
         // draw month-name centered above weekdays
         dc.GetTextExtent(headertext, &monthw, &monthh);
 
         // draw month-name centered above weekdays