From e112f01999228ea876eec98f97e8d9411e0b9ed8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Oct 2006 15:54:47 +0000 Subject: [PATCH] removed OnToolEnter() handler which interfered with the default tool long help handling; add long help for a couple of tools for testing purposes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/toolbar/toolbar.cpp | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index dd24065..0841abd 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -116,7 +116,6 @@ public: void OnToolLeftClick(wxCommandEvent& event); void OnToolRightClick(wxCommandEvent& event); - void OnToolEnter(wxCommandEvent& event); void OnCombo(wxCommandEvent& event); @@ -233,7 +232,6 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_COMBOBOX(ID_COMBO, MyFrame::OnCombo) - EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter) EVT_TOOL_RCLICKED(wxID_ANY, MyFrame::OnToolRightClick) EVT_UPDATE_UI(wxID_COPY, MyFrame::OnUpdateCopyAndCut) @@ -361,8 +359,12 @@ void MyFrame::RecreateToolbar() toolBar->SetToolBitmapSize(wxSize(w, h)); - toolBar->AddTool(wxID_NEW, _T("New"), toolBarBitmaps[Tool_new], _T("New file")); - toolBar->AddTool(wxID_OPEN, _T("Open"), toolBarBitmaps[Tool_open], _T("Open file")); + toolBar->AddTool(wxID_NEW, _T("New"), + toolBarBitmaps[Tool_new], wxNullBitmap, wxITEM_NORMAL, + _T("New file"), _T("This is help for new file tool")); + toolBar->AddTool(wxID_OPEN, _T("Open"), + toolBarBitmaps[Tool_open], wxNullBitmap, wxITEM_NORMAL, + _T("Open file"), _T("This is help for open file tool")); // the generic toolbar doesn't really support this #if wxUSE_TOOLBAR_NATIVE && !defined(__WXX11__) || defined(__WXUNIVERSAL__) @@ -826,22 +828,6 @@ void MyFrame::OnInsertPrint(wxCommandEvent& WXUNUSED(event)) tb->Realize(); } -void MyFrame::OnToolEnter(wxCommandEvent& event) -{ -#if wxUSE_STATUSBAR - if (event.GetSelection() > -1) - { - wxString str; - str.Printf(_T("This is tool number %d"), event.GetSelection()); - SetStatusText(str); - } - else - SetStatusText(wxEmptyString); -#else - wxUnusedVar(event); -#endif // wxUSE_STATUSBAR -} - void MyFrame::OnToggleRadioBtn(wxCommandEvent& event) { if ( m_tbar ) -- 2.7.4