Added wxComboCtrlBase::SetFore/BackgroundColour()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli 2009-12-25 09:04:53 +00:00
parent 03ef5fefb8
commit 5f54075053
2 changed files with 25 additions and 0 deletions

View File

@ -483,6 +483,10 @@ protected:
// override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const;
// also set the embedded wxTextCtrl colours
virtual bool SetForegroundColour(const wxColour& colour);
virtual bool SetBackgroundColour(const wxColour& colour);
// NULL popup can be used to indicate default in a derived class
virtual void DoSetPopupControl(wxComboPopup* popup);

View File

@ -1322,6 +1322,27 @@ wxValidator* wxComboCtrlBase::GetValidator()
}
#endif // wxUSE_VALIDATORS
bool wxComboCtrlBase::SetForegroundColour(const wxColour& colour)
{
if ( wxControl::SetForegroundColour(colour) )
{
if ( m_text )
m_text->SetForegroundColour(colour);
return true;
}
return false;
}
bool wxComboCtrlBase::SetBackgroundColour(const wxColour& colour)
{
if ( wxControl::SetBackgroundColour(colour) )
{
if ( m_text )
m_text->SetBackgroundColour(colour);
return true;
}
return false;
}
// ----------------------------------------------------------------------------
// painting
// ----------------------------------------------------------------------------