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
This commit is contained in:
@@ -54,6 +54,12 @@ class wxRightTextCtrl(wxTextCtrl):
|
|||||||
y = (dcheight - textheight) / 2
|
y = (dcheight - textheight) / 2
|
||||||
x = dcwidth - textwidth - 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.SetClippingRegion(0, 0, dcwidth, dcheight)
|
||||||
dc.DrawText(text, x, y)
|
dc.DrawText(text, x, y)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user