Implement wxWindow::GetToolTipText().

This was declared in wx/window.h but somehow never implemented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-07-25 23:13:58 +00:00
parent 704006b381
commit a16a233822
2 changed files with 10 additions and 0 deletions

View File

@ -2216,6 +2216,11 @@ public:
*/
wxToolTip* GetToolTip() const;
/**
Get the text of the associated tooltip or empty string if none.
*/
wxString GetToolTipText() const;
/**
Attach a tooltip to the window.

View File

@ -1878,6 +1878,11 @@ void wxWindowBase::OnHelp(wxHelpEvent& event)
#if wxUSE_TOOLTIPS
wxString wxWindowBase::GetToolTipText() const
{
return m_tooltip ? m_tooltip->GetTip() : wxString();
}
void wxWindowBase::SetToolTip( const wxString &tip )
{
// don't create the new tooltip if we already have one