X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48aa18c000b0133853d5bb2fa9a23b196d7ce6cd..992c81e203e21576f20b01a778dca85103155bee:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 256853fbcc..74b01d4174 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -41,6 +41,7 @@ #include "wx/validate.h" #endif +#include "wx/tooltip.h" #include "wx/popupwin.h" #include "wx/univ/renderer.h" @@ -351,6 +352,29 @@ bool wxComboControl::Show(bool show) return TRUE; } +#if wxUSE_TOOLTIPS +void wxComboControl::DoSetToolTip(wxToolTip *tooltip) +{ + wxControl::DoSetToolTip(tooltip); + + // Set tool tip for button and text box + if (m_text && m_btn) + { + if (tooltip) + { + const wxString &tip = tooltip->GetTip(); + m_text->SetToolTip(tip); + m_btn->SetToolTip(tip); + } + else + { + m_text->SetToolTip(NULL); + m_btn->SetToolTip(NULL); + } + } +} +#endif // wxUSE_TOOLTIPS + // ---------------------------------------------------------------------------- // popup window handling // ----------------------------------------------------------------------------