X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/093dee5e9d6574cf2c4e4c6764b7a40573ae4a4d..9386cb75e34acb49cd9fac945e09cf002f22db2d:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 25aecb4bdf..c1975d4c51 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -2176,6 +2176,23 @@ 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 // ----------------------------------------------------------------------------