void WidgetsFrame::OnSetTooltip(wxCommandEvent& WXUNUSED(event))
{
+ WidgetsPage *page = CurrentPage();
+
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
static wxString s_tip = _T("This is a tooltip");
wxTextEntryDialog dialog
s_tip = dialog.GetValue();
s_tip.Replace(_T("\\n"), _T("\n"));
- WidgetsPage *page = CurrentPage();
page->GetWidget()->SetToolTip(s_tip);
wxControl *ctrl2 = page->GetWidget2();
#if wxUSE_COLOURDLG
// allow for debugging the default colour the first time this is called
WidgetsPage *page = CurrentPage();
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
if (!m_colFg.Ok())
m_colFg = page->GetForegroundColour();
{
#if wxUSE_COLOURDLG
WidgetsPage *page = CurrentPage();
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
if ( !m_colBg.Ok() )
m_colBg = page->GetBackgroundColour();
{
#if wxUSE_FONTDLG
WidgetsPage *page = CurrentPage();
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
if (!m_font.Ok())
m_font = page->GetFont();
void WidgetsFrame::OnEnable(wxCommandEvent& event)
{
WidgetsPage *page = CurrentPage();
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
page->GetWidget()->Enable(event.IsChecked());
}
WidgetsPage::ms_defaultFlags |= border;
WidgetsPage *page = CurrentPage();
+
+ if(!page)
+ {
+ wxLogMessage(_T("Page not selected."));
+ return;
+ }
+
page->RecreateWidget();
}