]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch from F. Oliver Gathmann to observer enabled/disabled state of
authorRobin Dunn <robin@alldunn.com>
Sun, 5 Nov 2006 22:03:45 +0000 (22:03 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 5 Nov 2006 22:03:45 +0000 (22:03 +0000)
the control by changing text fg color.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/stattext.py

index fddbf4e60e1ffa5e723c7bbbb34625ce8cc2e041..54d7c64e93c7bbccc8ff5cc5abb760d86d7b6cd5 100644 (file)
@@ -137,7 +137,10 @@ class GenStaticText(wx.PyControl):
             dc.SetBackground(backBrush)
             dc.Clear()
 
-        dc.SetTextForeground(self.GetForegroundColour())
+        if self.IsEnabled():
+             dc.SetTextForeground(self.GetForegroundColour())
+         else:
+             dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))
         dc.SetFont(self.GetFont())
         label = self.GetLabel()
         style = self.GetWindowStyleFlag()