fix for [ 1052989 ] TextCtrl.SetBackgroundColour(wx.NullColour) bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-11-07 14:14:10 +00:00
parent 093dee5e9d
commit 52f2f7b2c1
2 changed files with 18 additions and 0 deletions

View File

@@ -252,6 +252,8 @@ protected:
// code as to why this is needed) // code as to why this is needed)
bool m_suppressNextUpdate; bool m_suppressNextUpdate;
virtual wxVisualAttributes GetDefaultAttributes() const;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl) DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)

View File

@@ -2176,6 +2176,22 @@ bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result); return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result);
} }
// ----------------------------------------------------------------------------
// default colors for MSW text control
// ----------------------------------------------------------------------------
wxVisualAttributes wxTextCtrl::GetDefaultAttributes() const
{
// it is important to return valid values for all attributes from here,
// GetXXX() below rely on this
wxVisualAttributes attrs;
attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
return attrs;
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// colour setting for the rich edit controls // colour setting for the rich edit controls
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------