X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c299c3ab663257429983c24e6fb71450f3cf9f1..9fd9e47a93dfcdd99c2722e288a0f28a51ce6f5f:/src/os2/spinbutt.cpp diff --git a/src/os2/spinbutt.cpp b/src/os2/spinbutt.cpp index 6e58a26322..2103d2c98b 100644 --- a/src/os2/spinbutt.cpp +++ b/src/os2/spinbutt.cpp @@ -61,6 +61,7 @@ bool wxSpinButton::Create( int nY = rPos.y; int nWidth = rSize.x; int nHeight = rSize.y; + SWP vSwp; m_min = 0; m_max = 100; @@ -128,7 +129,15 @@ bool wxSpinButton::Create( if(pParent) pParent->AddChild((wxSpinButton *)this); - SetFont(pParent->GetFont()); + ::WinQueryWindowPos(m_hWnd, &vSwp); + SetXComp(vSwp.x); + SetYComp(vSwp.y); + wxFont* pTextFont = new wxFont( 10 + ,wxMODERN + ,wxNORMAL + ,wxNORMAL + ); + SetFont(*pTextFont); // // For OS/2 we want to hide the text portion so we can substitute an // independent text ctrl in its place. 10 device units does this @@ -143,6 +152,7 @@ bool wxSpinButton::Create( ); ::WinSetWindowULong(GetHwnd(), QWL_USER, (LONG)this); fnWndProcSpinCtrl = (WXFARPROC)::WinSubclassWindow(m_hWnd, (PFNWP)wxSpinCtrlWndProc); + delete pTextFont; return TRUE; } // end of wxSpinButton::Create