From 51ce89f1bf960d38cb34f6f0c0b9845e6c7efaaf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Apr 2004 14:54:07 +0000 Subject: [PATCH] removed (well, kept empty shell to avoid breaking existing code) InheritAttributes() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/control.h | 5 +++-- src/common/ctrlcmn.cpp | 14 -------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/include/wx/control.h b/include/wx/control.h index bcfe71a48f..ecde84ec8f 100644 --- a/include/wx/control.h +++ b/include/wx/control.h @@ -74,8 +74,9 @@ protected: const wxValidator& validator, const wxString& name); - // inherit colour and font settings from the parent window - void InheritAttributes(); + // this function is obsolete, it is only kept for backwards compatibility, + // do *not* use it + void InheritAttributes() { } // initialize the common fields of wxCommandEvent void InitCommandEvent(wxCommandEvent& event) const; diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index 9c9714914b..b46c4f8f8d 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -89,20 +89,6 @@ bool wxControlBase::CreateControl(wxWindowBase *parent, return TRUE; } -// inherit colour and font settings from the parent window -void wxControlBase::InheritAttributes() -{ - if ( ShouldInheritColours() ) - { - wxWindow *parent = GetParent(); - - wxCHECK_RET( parent, _T("a control without parent?") ); - - SetBackgroundColour(parent->GetBackgroundColour()); - SetForegroundColour(parent->GetForegroundColour()); - } -} - void wxControlBase::Command(wxCommandEvent& event) { (void)GetEventHandler()->ProcessEvent(event); -- 2.45.2