From edd13c9d8a9a4493d6883e55248c5bc6871835b7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 5 Nov 2006 22:03:45 +0000 Subject: [PATCH] Patch from F. Oliver Gathmann to observer enabled/disabled state of 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/wx/lib/stattext.py b/wxPython/wx/lib/stattext.py index fddbf4e60e..54d7c64e93 100644 --- a/wxPython/wx/lib/stattext.py +++ b/wxPython/wx/lib/stattext.py @@ -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() -- 2.50.0