show tooltips for the text control part of the spin control as well (bug 735044)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-28 01:23:03 +00:00
parent 1306e7d6ec
commit 74124ea961
2 changed files with 21 additions and 10 deletions

View File

@@ -96,6 +96,9 @@ protected:
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual wxSize DoGetBestSize() const;
virtual void DoGetSize(int *width, int *height) const;
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
// the handler for wxSpinButton events
void OnSpinChange(wxSpinEvent& event);

View File

@@ -5,7 +5,7 @@
// Modified by:
// Created: 22.07.99
// RCS-ID: $Id$
// Copyright: (c) Vadim Zeitlin
// Copyright: (c) 1999-2005 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -35,14 +35,13 @@
#if wxUSE_SPINCTRL
#if defined(__WIN95__)
#include "wx/spinctrl.h"
#include "wx/msw/private.h"
#include "wx/msw/wrapcctl.h"
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include <commctrl.h>
#endif
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS
#include <limits.h> // for INT_MIN
@@ -502,6 +501,18 @@ void wxSpinCtrl::SetFocus()
::SetFocus(GetBuddyHwnd());
}
#if wxUSE_TOOLTIPS
void wxSpinCtrl::DoSetToolTip(wxToolTip *tip)
{
wxSpinButton::DoSetToolTip(tip);
if ( tip )
tip->Add(m_hwndBuddy);
}
#endif // wxUSE_TOOLTIPS
// ----------------------------------------------------------------------------
// event processing
// ----------------------------------------------------------------------------
@@ -593,8 +604,5 @@ void wxSpinCtrl::DoGetPosition(int *x, int *y) const
wxConstCast(this, wxSpinCtrl)->m_hWnd = hWnd;
}
#endif // __WIN95__
#endif
// wxUSE_SPINCTRL
#endif // wxUSE_SPINCTRL