wxCalendarCtrl works under MSW too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-29 23:34:18 +00:00
parent 5d5b3a40f3
commit 882a8f40e2
10 changed files with 254 additions and 60 deletions

View File

@@ -325,11 +325,31 @@ void wxComboBox::SetSelection(long from, long to)
#endif
}
void wxComboBox::DoSetSize(int x, int y,
int width, int height,
int sizeFlags)
void wxComboBox::DoMoveWindow(int x, int y, int width, int height)
{
wxControl::DoSetSize(x, y, width, height, sizeFlags);
int cx, cy;
wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
int n = GetCount();
if ( !n )
n = 10;
height = n * EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
wxControl::DoMoveWindow(x, y, width, height);
}
wxSize wxComboBox::DoGetBestSize() const
{
// the choice calculates the horz size correctly, but not the vertical
// component: correct it
wxSize size = wxChoice::DoGetBestSize();
int cx, cy;
wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
size.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
return size;
}
#endif