+void MyFrame::OnLogClear(wxCommandEvent& WXUNUSED(event))
+{
+ m_panel->m_log->Clear();
+}
+
+void MyFrame::OnSetEditable(wxCommandEvent& WXUNUSED(event))
+{
+ static bool s_editable = TRUE;
+
+ s_editable = !s_editable;
+ m_panel->m_text->SetEditable(s_editable);
+ m_panel->m_password->SetEditable(s_editable);
+ m_panel->m_multitext->SetEditable(s_editable);
+ m_panel->m_textrich->SetEditable(s_editable);
+}
+
+void MyFrame::OnSetEnabled(wxCommandEvent& WXUNUSED(event))
+{
+ bool enabled = m_panel->m_text->IsEnabled();
+ enabled = !enabled;
+
+ m_panel->m_text->Enable(enabled);
+ m_panel->m_password->Enable(enabled);
+ m_panel->m_multitext->Enable(enabled);
+ m_panel->m_readonly->Enable(enabled);
+ m_panel->m_textrich->Enable(enabled);
+}
+
+void MyFrame::OnFileSave(wxCommandEvent& event)
+{
+ if ( m_panel->m_textrich->SaveFile("dummy.txt") )
+ {
+#if wxUSE_FILE
+ // verify that the fil length is correct (it wasn't under Win95)
+ wxFile file("dummy.txt");
+ wxLogStatus(this, _T("Successfully saved file "
+ "(text len = %ld, file size = %ld)"),
+ m_panel->m_textrich->GetValue().length(),
+ file.Length());
+#endif
+ }
+ else
+ wxLogStatus(this, _T("Couldn't save the file"));
+}
+