X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..5541d1fda4b73af86e42b2f43724f0c063a352d0:/src/msw/choice.cpp diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index d7d982797c..fc53d9298d 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_CHOICE + #ifndef WX_PRECOMP #include "wx/choice.h" #include "wx/utils.h" @@ -38,7 +40,7 @@ #include "wx/msw/private.h" - IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) // ============================================================================ // implementation @@ -64,6 +66,10 @@ bool wxChoice::Create(wxWindow *parent, if ( style & wxCB_SORT ) msStyle |= CBS_SORT; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + + // Experience shows that wxChoice vs. wxComboBox distinction confuses // quite a few people - try to help them wxASSERT_MSG( !(style & wxCB_DROPDOWN) && @@ -77,7 +83,7 @@ bool wxChoice::Create(wxWindow *parent, // A choice/combobox normally has a white background (or other, depending // on global settings) rather than inheriting the parent's background colour. - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); for ( int i = 0; i < n; i++ ) { @@ -185,14 +191,11 @@ int wxChoice::FindString(const wxString& s) const #endif // Watcom/!Watcom } -void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s)) +void wxChoice::SetString(int n, const wxString& s) { - wxFAIL_MSG(wxT("not implemented")); - -#if 0 // should do this, but no Insert() so far - Delete(n); - Insert(n + 1, s); -#endif + wxCHECK_RET( (n>=0)&&(nGetResourceHandle(); } - +#endif // wxUSE_CHOICE