]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxComboCtrlBase::SetFore/BackgroundColour()
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 25 Dec 2009 09:04:53 +0000 (09:04 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 25 Dec 2009 09:04:53 +0000 (09:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/combo.h
src/common/combocmn.cpp

index 797658c901a568b83695c87afebfb032c88be185..718adde3552bcbdf6d491dc90cce1f475ee835b8 100644 (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);
 
index 71b6075086ea69f2b9a609f27acb0d3f1de94852..10f41f8473843931fb28a9854393230f6bbf8a44 100644 (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
 // ----------------------------------------------------------------------------