X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3f3984bcab534a94c45de486e9a4e5263db726c..c698eae5a875ca973df44add1ad67ec69a5754ba:/src/univ/radiobox.cpp?ds=inline diff --git a/src/univ/radiobox.cpp b/src/univ/radiobox.cpp index 249fba0b25..5c434fa20b 100644 --- a/src/univ/radiobox.cpp +++ b/src/univ/radiobox.cpp @@ -6,7 +6,7 @@ // Created: 11.09.00 // RCS-ID: $Id$ // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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 // ----------------------------------------------------------------------------