X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3f3984bcab534a94c45de486e9a4e5263db726c..d6379fa35ae3de7140bd79623fc7ffeb9e6d6be1:/src/univ/radiobox.cpp?ds=sidebyside diff --git a/src/univ/radiobox.cpp b/src/univ/radiobox.cpp index 249fba0b25..3ad1c07304 100644 --- a/src/univ/radiobox.cpp +++ b/src/univ/radiobox.cpp @@ -36,6 +36,8 @@ #include "wx/validate.h" #endif +#include "wx/tooltip.h" + #include "wx/univ/theme.h" #include "wx/univ/renderer.h" #include "wx/univ/inphand.h" @@ -341,6 +343,23 @@ void wxRadioBox::SetLabel(const wxString& label) wxStaticBox::SetLabel(label); } +#if wxUSE_TOOLTIPS +void wxRadioBox::DoSetToolTip(wxToolTip *tooltip) +{ + wxControl::DoSetToolTip(tooltip); + + // Also set them for all Radio Buttons + size_t count = m_buttons.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if (tooltip) + m_buttons[n]->SetToolTip(tooltip->GetTip()); + else + m_buttons[n]->SetToolTip(NULL); + } +} +#endif // wxUSE_TOOLTIPS + // ---------------------------------------------------------------------------- // buttons positioning // ----------------------------------------------------------------------------