]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/listbox.cpp
Some more fiddling with two-window approach and
[wxWidgets.git] / src / os2 / listbox.cpp
index 04dffe2b68b7098a2536f649adc17f01fefab98a..2e7ffc1757d4d611f6a27a41b4f722325716216c 100644 (file)
@@ -22,6 +22,7 @@
 #include "wx/font.h"
 #include "wx/dc.h"
 #include "wx/utils.h"
+#include "wx/scrolwin.h"
 #endif
 
 #define INCL_M
@@ -169,12 +170,41 @@ bool wxListBox::Create(
     {
         Append(asChoices[lUi]);
     }
-    SetFont(pParent->GetFont());
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
+
+    //
+    // Set standard wxWindows colors for Listbox items and highlighting
+    //
+    wxColour                        vColour;
+
+    vColour.Set(wxString("WHITE"));
+
+    LONG                            lColor = (LONG)vColour.GetPixel();
+
+    ::WinSetPresParam( m_hWnd
+                      ,PP_HILITEFOREGROUNDCOLOR
+                      ,sizeof(LONG)
+                      ,(PVOID)&lColor
+                     );
+    vColour.Set(wxString("NAVY"));
+    lColor = (LONG)vColour.GetPixel();
+    ::WinSetPresParam( m_hWnd
+                      ,PP_HILITEBACKGROUNDCOLOR
+                      ,sizeof(LONG)
+                      ,(PVOID)&lColor
+                     );
+
     SetSize( nX
             ,nY
             ,nWidth
             ,nHeight
            );
+    delete pTextFont;
     return TRUE;
 } // end of wxListBox::Create
 
@@ -192,7 +222,7 @@ wxListBox::~wxListBox()
 
 void wxListBox::SetupColours()
 {
-    SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
     SetForegroundColour(GetParent()->GetForegroundColour());
 } // end of wxListBox::SetupColours