MENU_LINK(Quit)
MENU_LINK(About)
+ MENU_LINK(ClearLog)
MENU_LINK(TogButtons)
MENU_LINK(TogTwist)
*tree_menu = new wxMenu,
*item_menu = new wxMenu;
+ file_menu->Append(TreeTest_ClearLog, wxT("&Clear log\tCtrl-L"));
+ file_menu->AppendSeparator();
file_menu->Append(TreeTest_About, wxT("&About..."));
file_menu->AppendSeparator();
file_menu->Append(TreeTest_Quit, wxT("E&xit\tAlt-X"));
style_menu->AppendCheckItem(TreeTest_TogFullHighlight, wxT("Toggle &full row highlight"));
style_menu->AppendCheckItem(TreeTest_TogEdit, wxT("Toggle &edit mode"));
#ifndef NO_MULTIPLE_SELECTION
- style_menu->AppendCheckItem(TreeTest_ToggleSel, wxT("Toggle &selection mode"));
+ style_menu->AppendCheckItem(TreeTest_ToggleSel, wxT("Toggle &selection mode\tCtrl-S"));
#endif // NO_MULTIPLE_SELECTION
style_menu->AppendCheckItem(TreeTest_ToggleImages, wxT("Toggle show ima&ges"));
style_menu->AppendCheckItem(TreeTest_ToggleAlternateImages, wxT("Toggle alternate images"));
{
wxSize size = GetClientSize();
m_treeCtrl->SetSize(0, 0, size.x, size.y
-#if !wxUSE_LOG
- );
-#else
+#if wxUSE_LOG
*2/3);
- m_textCtrl->SetSize(0, 2*size.y/3, size.x, size.y/3);
+ m_textCtrl->SetSize(0, 2*size.y/3, size.x, size.y/3
#endif
+ );
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
wxOK | wxICON_INFORMATION, this);
}
+void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))
+{
+ m_textCtrl->Clear();
+}
+
void MyFrame::OnRename(wxCommandEvent& WXUNUSED(event))
{
wxTreeItemId item = m_treeCtrl->GetSelection();