// override some base class virtuals
virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
+ virtual void DoGetSize(int *width, int *height) const;
private:
// common part of all ctors
wxControl::DoMoveWindow(x, y + yDiff, width, height - yDiff);
}
+void wxGenericCalendarCtrl::DoGetSize(int *width, int *height) const
+{
+#ifdef __WXMAC__
+ wxControl::DoGetSize( width, height );
+
+ if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth && height )
+ {
+ wxSize sizeCombo = m_comboMonth->GetEffectiveMinSize();
+ wxSize sizeSpin = m_spinYear->GetSize();
+
+ int maxHeight = wxMax(sizeSpin.y, sizeCombo.y);
+ *height += maxHeight + VERT_MARGIN;
+ }
+#else
+ wxControl::DoGetSize( width, height );
+#endif
+}
+
void wxGenericCalendarCtrl::RecalcGeometry()
{
wxClientDC dc(this);