, int nY
, int nWidth
, int nHeight
-, long lSizeFlags
+, int nSizeFlags
)
{
wxSize vMaxSize;
// System fonts are too big in OS/2 and they are blue
// We want smaller fonts and black by default.
//
- wxFont& rFont = *wxSMALL_FONT;
+ wxFont* pTextFont = new wxFont( 10
+ ,wxMODERN
+ ,wxNORMAL
+ ,wxNORMAL
+ );
wxColour vColour;
LONG lColor;
if (!OS2CreateControl( "STATIC"
- ,SS_GROUPBOX | WS_GROUP
+#if RADIOBTN_PARENT_IS_RADIOBOX
+ ,SS_GROUPBOX | WS_GROUP | WS_CLIPCHILDREN
+#else
+ ,SS_GROUPBOX | WS_GROUP | WS_CLIPSIBLINGS
+#endif
,rPos
,rSize
,rsTitle
m_pnRadioWidth = new int[nNum];
m_pnRadioHeight = new int[nNum];
- if (rFont.Ok())
+ if (pTextFont->Ok())
{
- hFont = rFont.GetResourceHandle();
+ hFont = pTextFont->GetResourceHandle();
}
for (int i = 0; i < nNum; i++)
,NULL
,NULL
);
+ lColor = (LONG)vColour.GetPixel();
::WinSetPresParam( hWndBtn
,PP_FOREGROUNDCOLOR
,sizeof(LONG)
,(PVOID)&lColor
);
+ lColor = (LONG)m_backgroundColour.GetPixel();
+
+ ::WinSetPresParam( hWndBtn
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
if (!hWndBtn)
{
return FALSE;
m_ahRadioButtons[i] = (WXHWND)hWndBtn;
SubclassRadioButton((WXHWND)hWndBtn);
wxOS2SetFont( hWndBtn
- ,rFont
+ ,*pTextFont
);
::WinSetWindowULong(hWndBtn, QWL_USER, (ULONG)this);
m_aSubControls.Add(nNewId);
,NULL
,NULL
);
- SetFont(*wxSMALL_FONT);
+ SetFont(*pTextFont);
+ lColor = (LONG)vColour.GetPixel();
::WinSetPresParam( m_hWnd
,PP_FOREGROUNDCOLOR
,sizeof(LONG)
,(PVOID)&lColor
);
+ lColor = (LONG)m_backgroundColour.GetPixel();
+
+ ::WinSetPresParam( m_hWnd
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
SetSelection(0);
SetSize( rPos.x
,rPos.y
,rSize.x
,rSize.y
);
+ delete pTextFont;
return TRUE;
} // end of wxRadioBox::Create
if (pParent)
{
- nYy = pParent->GetClientSize().y - (nYy + nHeight);
+ int nOS2Height = GetOS2ParentHeight(pParent);
+
+ nYy = nOS2Height - (nYy + nHeight);
nYOffset = nYy + nHeight;
}
else