]> git.saurik.com Git - wxWidgets.git/commitdiff
refresh widget after changing its colour
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 20:04:22 +0000 (20:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 20:04:22 +0000 (20:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/widgets/widgets.cpp

index 748d97c5da5c201742958c5e518cf04d33e62bf7..e97145617e8a8b49132bbfbdfa7657b6a27f1ad0 100644 (file)
@@ -407,6 +407,7 @@ void WidgetsFrame::OnSetFgCol(wxCommandEvent& WXUNUSED(event))
 
     WidgetsPage *page = wxStaticCast(m_notebook->GetCurrentPage(), WidgetsPage);
     page->GetWidget()->SetForegroundColour(m_colFg);
+    page->GetWidget()->Refresh();
 }
 
 void WidgetsFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
@@ -419,6 +420,7 @@ void WidgetsFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
 
     WidgetsPage *page = wxStaticCast(m_notebook->GetCurrentPage(), WidgetsPage);
     page->GetWidget()->SetBackgroundColour(m_colBg);
+    page->GetWidget()->Refresh();
 }
 
 #endif // wxUSE_MENUS