From 9e67e54178982e02ae96a2da2fe7773ffd8b193b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 5 Dec 2004 14:01:29 +0000 Subject: [PATCH] Moved GetDefaultAttributes outside wxUSE_RICHEDIT block git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 18912b2bd1..bf6b78b836 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -2078,6 +2078,23 @@ void wxTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event)) } } +// ---------------------------------------------------------------------------- +// Default colors for MSW text control +// +// Set default background color to the native white instead of +// the default wxSYS_COLOUR_BTNFACE (is triggered with wxNullColour). +// ---------------------------------------------------------------------------- + +wxVisualAttributes wxTextCtrl::GetDefaultAttributes() const +{ + wxVisualAttributes attrs; + attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); //white + + return attrs; +} + // the rest of the file only deals with the rich edit controls #if wxUSE_RICHEDIT @@ -2181,23 +2198,6 @@ bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result); } -// ---------------------------------------------------------------------------- -// Default colors for MSW text control -// -// Set default background color to the native white instead of -// the default wxSYS_COLOUR_BTNFACE (is triggered with wxNullColour). -// ---------------------------------------------------------------------------- - -wxVisualAttributes wxTextCtrl::GetDefaultAttributes() const -{ - wxVisualAttributes attrs; - attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); - attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); - attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); //white - - return attrs; -} - // ---------------------------------------------------------------------------- // colour setting for the rich edit controls // ---------------------------------------------------------------------------- -- 2.45.2