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
This commit is contained in:
Robin Dunn 2006-11-05 22:03:45 +00:00
parent 59c516a34a
commit edd13c9d8a

View 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()