Made wxWindow::Enable recursive in order to solve colouring problems; forced the colour

of a wxTextCtrl back to the custom colour in wxTextCtrl::Enable. This appears
to fix inconsistent colour problems.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-05-16 15:53:11 +00:00
parent 19d7140ec2
commit 513903c4f9
4 changed files with 48 additions and 0 deletions

View File

@@ -2948,6 +2948,16 @@ bool wxWindow::Enable( bool enable )
if ( m_wxwindow )
gtk_widget_set_sensitive( m_wxwindow, enable );
// Recurse, so that children have the opportunity to Do The Right Thing.
for ( wxWindowList::Node *node = GetChildren().GetFirst();
node;
node = node->GetNext() )
{
wxWindow *child = node->GetData();
if (!child->IsKindOf(CLASSINFO(wxDialog)) && !child->IsKindOf(CLASSINFO(wxFrame)))
child->Enable(enable);
}
return TRUE;
}