X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/49dc8caac934c29f69aed750a412eb60aad84b67..71110b404c5cbef2175b2be645783e93d9a2b8c4:/src/os2/listbox.cpp diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 04dffe2b68..2e7ffc1757 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -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