X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d44b24ee63543390aa28e1eb4ff162da4264838..71110b404c5cbef2175b2be645783e93d9a2b8c4:/src/os2/listbox.cpp diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 9fe882a4fb..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 @@ -142,15 +143,6 @@ bool wxListBox::Create( // lStyle |= LS_NOADJUSTPOS; - // - // If the parent is a scrolled window the controls must - // have this style or they will overlap the scrollbars - // - if (pParent) - if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) || - pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow))) - lStyle |= WS_CLIPSIBLINGS; - m_hWnd = (WXHWND)::WinCreateWindow( GetWinHwnd(pParent) // Parent ,WC_LISTBOX // Default Listbox class ,"LISTBOX" // Control's name @@ -178,8 +170,13 @@ 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 // @@ -207,6 +204,7 @@ bool wxListBox::Create( ,nWidth ,nHeight ); + delete pTextFont; return TRUE; } // end of wxListBox::Create @@ -224,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