X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..18128cbb47b5775f20fb449dd34f36fa31776d51:/src/msw/choice.cpp diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 87f286d943..2f7587a4f3 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++ ) { @@ -187,12 +193,9 @@ int wxChoice::FindString(const wxString& s) const 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