- wxPoint posBtn(pos);
- posBtn.x += sizeText.x + MARGIN_BETWEEN;
-
- // create the spin button
- if ( !wxSpinButton::Create(parent, id, posBtn, sizeBtn, style, name) )
- {
- return FALSE;
- }
-
- SetRange(min, max);
- SetValue(initial);
-
- // create the text window
- m_hwndBuddy = (WXHWND)::CreateWindowEx
- (
- WS_EX_CLIENTEDGE, // sunken border
- _T("EDIT"), // window class
- NULL, // no window title
- WS_CHILD | WS_BORDER, // style (will be shown later)
- pos.x, pos.y, // position
- 0, 0, // size (will be set later)
- GetHwndOf(parent), // parent
- (HMENU)-1, // control id
- wxGetInstance(), // app instance
- NULL // unused client data
- );
-
- if ( !m_hwndBuddy )
- {
- wxLogLastError("CreateWindow(buddy text window)");
+wxSize wxSpinCtrl::DoGetBestSize() const
+{
+ wxSize vSizeBtn = wxSpinButton::DoGetBestSize();
+ int nHeight;
+ wxFont vFont = (wxFont)GetFont();