X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad9835c97c10c0d7de345e3a7a7c0fc2776eb2cb..2861eaee452dfef7aeaca2685be663db4e07510e:/src/common/valgen.cpp diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index 3d77628f4a..d9de2dea7b 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -34,6 +34,7 @@ #include "wx/button.h" #include "wx/listbox.h" #include "wx/slider.h" + #include "wx/checklst.h" #endif #include "wx/spinctrl.h" @@ -41,9 +42,6 @@ #if wxUSE_SPINBTN #include "wx/spinbutt.h" #endif -#if wxUSE_CHECKLISTBOX - #include "wx/checklst.h" -#endif #if wxUSE_TOGGLEBTN #include "wx/tglbtn.h" #endif @@ -123,6 +121,7 @@ bool wxGenericValidator::TransferToWindow(void) } } else #endif + #if wxUSE_TOGGLEBTN if (m_validatorWindow->IsKindOf(CLASSINFO(wxToggleButton)) ) { @@ -133,6 +132,17 @@ bool wxGenericValidator::TransferToWindow(void) return true; } } else +#if defined(__WXMAC__) || defined(__WXGTK20__) + if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) ) + { + wxBitmapToggleButton * pControl = (wxBitmapToggleButton *) m_validatorWindow; + if (m_pBool) + { + pControl->SetValue(*m_pBool); + return true; + } + } else +#endif #endif // int controls