Applied patch [ 652336 ] Add tooltip support to wxUniv on Windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-01-03 12:14:59 +00:00
parent df4a528177
commit d4e5272b3a
6 changed files with 54 additions and 2 deletions

View 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
// ----------------------------------------------------------------------------