X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ebb51430cd8e4a9a11c6c5a5ca7c3ff9d7a72a..05fc6c0a67822034f23a6e6c3fb9e75989fcc5a3:/src/os2/listbox.cpp diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 76ab92fbe8..2ecb09a5eb 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -34,9 +34,7 @@ #include "wx/ownerdrw.h" #endif -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) -#endif // ============================================================================ // list box item declaration and implementation @@ -80,7 +78,9 @@ bool wxListBox::Create(wxWindow *parent, const wxSize& size, int n, const wxString choices[], long style, +#if wxUSE_VALIDATORS const wxValidator& validator, +#endif const wxString& name) { m_noItems = 0; @@ -88,7 +88,9 @@ bool wxListBox::Create(wxWindow *parent, m_selected = 0; SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif if (parent) parent->AddChild(this); @@ -602,7 +604,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s) */ } -wxSize wxListBox::DoGetBestSize() +wxSize wxListBox::DoGetBestSize() const { // find the widest string int wLine; @@ -622,7 +624,7 @@ wxSize wxListBox::DoGetBestSize() // the listbox should be slightly larger than the widest string int cx, cy; - wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont()); wListbox += 3*cx;