From 63d2cc405d531746d19b1adfeb7716115fcf2e7d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 11 Jun 2003 21:33:42 +0000 Subject: [PATCH] Draw with a different color if the control is disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/lib/rightalign.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wxPython/wxPython/lib/rightalign.py b/wxPython/wxPython/lib/rightalign.py index f4623c4c70..ca3c262d31 100644 --- a/wxPython/wxPython/lib/rightalign.py +++ b/wxPython/wxPython/lib/rightalign.py @@ -54,6 +54,12 @@ class wxRightTextCtrl(wxTextCtrl): y = (dcheight - textheight) / 2 x = dcwidth - textwidth - 2 + if self.IsEnabled(): + fclr = self.GetForegroundColour() + else: + fclr = wxSystemSettings_GetColour(wxSYS_COLOUR_GRAYTEXT) + dc.SetTextForeground(fclr) + dc.SetClippingRegion(0, 0, dcwidth, dcheight) dc.DrawText(text, x, y)