]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/radiobox.cpp
Add wxRTTI to generic wxDirDialog.
[wxWidgets.git] / src / univ / radiobox.cpp
index 249fba0b252985e37445d3eed54f367c1842e2bd..3ad1c0730472eb4a2ee8b4c5205e2d7b2b07343d 100644 (file)
@@ -36,6 +36,8 @@
     #include "wx/validate.h"
 #endif
 
     #include "wx/validate.h"
 #endif
 
+#include "wx/tooltip.h"
+
 #include "wx/univ/theme.h"
 #include "wx/univ/renderer.h"
 #include "wx/univ/inphand.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);
 }
 
     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
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // buttons positioning
 // ----------------------------------------------------------------------------