]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/radiobox.cpp
expand . into cwd
[wxWidgets.git] / src / os2 / radiobox.cpp
index 47a6fbdd9c0892761c6c05d8436600243ee8579a..70a9a050e400b5b13c485d3009e0a67d6c1542c9 100644 (file)
@@ -86,7 +86,7 @@ void wxRadioBox::AdjustButtons(
 , int                               nY
 , int                               nWidth
 , int                               nHeight
-, long                              lSizeFlags
+, int                               nSizeFlags
 )
 {
     wxSize                          vMaxSize;
@@ -294,7 +294,11 @@ bool wxRadioBox::Create(
 
 
     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
@@ -341,11 +345,19 @@ bool wxRadioBox::Create(
                                                                          ,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;
@@ -374,11 +386,19 @@ bool wxRadioBox::Create(
                              ,NULL
                             );
      SetFont(*wxSMALL_FONT);
+    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
@@ -480,7 +500,9 @@ void wxRadioBox::DoSetSize(
 
     if (pParent)
     {
-        nYy = pParent->GetClientSize().y - (nYy + nHeight);
+        int                         nOS2Height = GetOS2ParentHeight(pParent);
+
+        nYy = nOS2Height - (nYy + nHeight);
         nYOffset = nYy + nHeight;
     }
     else