diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index 9c32964145..e07c699b42 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -326,6 +326,7 @@ wxBEGIN_EVENT_TABLE( GridFrame, wxFrame ) EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour ) EVT_MENU( wxID_ABOUT, GridFrame::OnAbout ) + EVT_MENU( wxID_CLEAR, GridFrame::OnClear ) EVT_MENU( wxID_EXIT, GridFrame::OnQuit ) EVT_MENU( ID_VTABLE, GridFrame::OnVTable) EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable) @@ -420,6 +421,11 @@ GridFrame::GridFrame() fileMenu->Append( wxID_PRINT, "Render" ); fileMenu->Append( ID_RENDER_COORDS, "Render G5:P30" ); +#if wxUSE_LOG + fileMenu->AppendSeparator(); + fileMenu->Append( wxID_CLEAR, "Clear &log\tCtrl-L" ); +#endif // wxUSE_LOG + fileMenu->AppendSeparator(); fileMenu->Append( wxID_EXIT, "E&xit\tAlt-X" ); @@ -1767,6 +1773,13 @@ void GridFrame::OnAbout( wxCommandEvent& WXUNUSED(ev) ) } +void GridFrame::OnClear( wxCommandEvent& WXUNUSED(ev) ) +{ +#if wxUSE_LOG + logWin->Clear(); +#endif // wxUSE_LOG +} + void GridFrame::OnQuit( wxCommandEvent& WXUNUSED(ev) ) { Close( true ); diff --git a/samples/grid/griddemo.h b/samples/grid/griddemo.h index f02a32d821..fa196b0643 100644 --- a/samples/grid/griddemo.h +++ b/samples/grid/griddemo.h @@ -130,6 +130,7 @@ public: ~GridFrame(); void OnQuit( wxCommandEvent& ); + void OnClear( wxCommandEvent& ); void OnAbout( wxCommandEvent& ); void OnVTable( wxCommandEvent& ); void OnBugsTable( wxCommandEvent& );