]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/listbox.cpp
more threds fixes, more threads tests - seems to work ok for non GUI case
[wxWidgets.git] / src / os2 / listbox.cpp
index 76ab92fbe84c9ccc8ded78d5b5827634987cd98f..5408910fb3864c529f9ae32f9a58b75e425190e8 100644 (file)
@@ -80,7 +80,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 +90,9 @@ bool wxListBox::Create(wxWindow *parent,
     m_selected = 0;
 
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     if (parent)
         parent->AddChild(this);
@@ -602,7 +606,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
 */
 }
 
-wxSize wxListBox::DoGetBestSize()
+wxSize wxListBox::DoGetBestSize() const
 {
     // find the widest string
     int wLine;
@@ -622,7 +626,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;