]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/choice.cpp
Minor changes.
[wxWidgets.git] / src / os2 / choice.cpp
index 7448ef7e50fd9f7b5101c85cb0e5eddc38b99579..be96555450508cbe2838ccd1be60602f8432e0c0 100644 (file)
@@ -30,7 +30,9 @@ bool wxChoice::Create(wxWindow *parent,
                       const wxSize& size,
                       int n, const wxString choices[],
                       long style,
+#if wxUSE_VALIDATORS
                       const wxValidator& validator,
+#endif
                       const wxString& name)
 {
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
@@ -190,13 +192,12 @@ void* wxChoice::DoGetItemClientData( int n ) const
 
 void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
 {
-    DoSetClientData(n, clientData);
+    DoSetItemClientData(n, clientData);
 }
 
 wxClientData* wxChoice::DoGetItemClientObject( int n ) const
 {
-    // TODO:    return (wxClientData *)DoGetClientData(n);
-    return NULL;
+    return (wxClientData *)DoGetItemClientData(n);
 }
 
 // ----------------------------------------------------------------------------
@@ -215,7 +216,7 @@ void wxChoice::DoSetSize(int x, int y,
     wxControl::DoSetSize(x, y, width, -1, sizeFlags);
 }
 
-wxSize wxChoice::DoGetBestSize()
+wxSize wxChoice::DoGetBestSize() const
 {
     // find the widest string
     int wLine;
@@ -236,7 +237,7 @@ wxSize wxChoice::DoGetBestSize()
 
     // the combobox should be larger than the widest string
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont());
 
     wChoice += 5*cx;