]> git.saurik.com Git - wxWidgets.git/commitdiff
removed OnToolEnter() handler which interfered with the default tool long help handli...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 21 Oct 2006 15:54:47 +0000 (15:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 21 Oct 2006 15:54:47 +0000 (15:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/toolbar/toolbar.cpp

index dd2406500528b4c9f3ca9e39bf66a667eda91539..0841abd4ad20ee6d0e25c6f4d27f5d998b1daf51 100644 (file)
@@ -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 )