+void WidgetsFrame::OnSetFont(wxCommandEvent& WXUNUSED(event))
+{
+#if wxUSE_FONTDLG
+ WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ if (!m_font.Ok())
+ m_font = page->GetFont();
+
+ wxFont font = wxGetFontFromUser(this, m_font);
+ if ( !font.Ok() )
+ return;
+
+ m_font = font;
+
+ page->GetWidget()->SetFont(m_font);
+ page->GetWidget()->Refresh();
+
+ wxControl *ctrl2 = page->GetWidget2();
+ if ( ctrl2 )
+ {
+ ctrl2->SetFont(m_font);
+ ctrl2->Refresh();
+ }
+#else
+ wxLogMessage(_T("Font selection dialog not available in current build."));
+#endif
+}
+
+void WidgetsFrame::OnEnable(wxCommandEvent& event)
+{
+ WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ page->GetWidget()->Enable(event.IsChecked());
+}
+