]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
Applied patch [ 666379 ] CalCtrl doesn't use best sizes for the year combobox
[wxWidgets.git] / src / univ / combobox.cpp
index 256853fbccec22a75c327a2ae08e1495e3ca8769..74b01d41744853c650f1f3d4d02c479c7179f396 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------