From f855d4cbf594ab0e36c2bdd15a7e5e05f3baf279 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 31 Jan 2000 16:25:09 +0000 Subject: [PATCH] wxWS_EX_VALIDATE_RECURSIVELY set by default if parent has it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 068a995fd3..b41f60f7dc 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -126,7 +126,7 @@ void wxWindowBase::InitBase() #if !defined(__WXMAC__) && !defined(__WXGTK__) m_font = *wxSWISS_FONT; // and this? #else - m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); #endif // no style bits @@ -176,6 +176,15 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent, m_windowId = id == -1 ? NewControlId() : id; SetName(name); + + // if the parent window has wxWS_EX_VALIDATE_RECURSIVELY set, we want to + // have it too - like this it's possible to set it only in the top level + // dialog/frame and all children will inherit it by defult + if ( parent && (parent->GetWindowStyle() & wxWS_EX_VALIDATE_RECURSIVELY) ) + { + style |= wxWS_EX_VALIDATE_RECURSIVELY; + } + SetWindowStyleFlag(style); SetParent(parent); -- 2.47.2