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
This commit is contained in:
@@ -116,7 +116,6 @@ public:
|
|||||||
|
|
||||||
void OnToolLeftClick(wxCommandEvent& event);
|
void OnToolLeftClick(wxCommandEvent& event);
|
||||||
void OnToolRightClick(wxCommandEvent& event);
|
void OnToolRightClick(wxCommandEvent& event);
|
||||||
void OnToolEnter(wxCommandEvent& event);
|
|
||||||
|
|
||||||
void OnCombo(wxCommandEvent& event);
|
void OnCombo(wxCommandEvent& event);
|
||||||
|
|
||||||
@@ -233,7 +232,6 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_COMBOBOX(ID_COMBO, MyFrame::OnCombo)
|
EVT_COMBOBOX(ID_COMBO, MyFrame::OnCombo)
|
||||||
|
|
||||||
EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter)
|
|
||||||
EVT_TOOL_RCLICKED(wxID_ANY, MyFrame::OnToolRightClick)
|
EVT_TOOL_RCLICKED(wxID_ANY, MyFrame::OnToolRightClick)
|
||||||
|
|
||||||
EVT_UPDATE_UI(wxID_COPY, MyFrame::OnUpdateCopyAndCut)
|
EVT_UPDATE_UI(wxID_COPY, MyFrame::OnUpdateCopyAndCut)
|
||||||
@@ -361,8 +359,12 @@ void MyFrame::RecreateToolbar()
|
|||||||
|
|
||||||
toolBar->SetToolBitmapSize(wxSize(w, h));
|
toolBar->SetToolBitmapSize(wxSize(w, h));
|
||||||
|
|
||||||
toolBar->AddTool(wxID_NEW, _T("New"), toolBarBitmaps[Tool_new], _T("New file"));
|
toolBar->AddTool(wxID_NEW, _T("New"),
|
||||||
toolBar->AddTool(wxID_OPEN, _T("Open"), toolBarBitmaps[Tool_open], _T("Open file"));
|
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
|
// the generic toolbar doesn't really support this
|
||||||
#if wxUSE_TOOLBAR_NATIVE && !defined(__WXX11__) || defined(__WXUNIVERSAL__)
|
#if wxUSE_TOOLBAR_NATIVE && !defined(__WXX11__) || defined(__WXUNIVERSAL__)
|
||||||
@@ -826,22 +828,6 @@ void MyFrame::OnInsertPrint(wxCommandEvent& WXUNUSED(event))
|
|||||||
tb->Realize();
|
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)
|
void MyFrame::OnToggleRadioBtn(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if ( m_tbar )
|
if ( m_tbar )
|
||||||
|
Reference in New Issue
Block a user