Okay, I understand now. Yes, Rob makes an excellent
point. I had this problem when I developed my
application in Windows98, then ran it on XP. XP Themes
made much of the text virtually illegible.

Dave

--- Rob Kennedy <[EMAIL PROTECTED]> wrote:

> David Smith wrote:
> > I'm confused by this discussion. I am looking at a
> > TEdit and it's got Enabled, color, and Font.color
> all
> > right there on the object inspector. It's also got
> the
> > readonly property available.
> 
> I'm confused, too. This problem has absolutely
> nothing to do with the
> Font, Color, or Enabled properties. Nothing you do
> to those properties
> will change the way the TEdit control paints itself
> when it's disabled.
> 
> The TEdit gets painted by code in a Windows DLL. It
> honors the user's
> preferences regarding what color to use for disabled
> text and window
> background.
> 
> The goal here is to have a TEdit control that, when
> disabled, paints
> itself with a background of some color, presumably
> the default clWindow
> (not clWhite), and with a text color of clRed
> instead of the default
> clGrayText (not clGray). To do that, you need to
> write your own painting
> code. I think that involves writing your own
> wm_Paint handler since edit
> controls don't support the notion of owner-draw.
> 
> If you're going to use a non-default foreground
> color, make sure to also
> use a non-default background color. Otherwise, you
> risk painting
> unreadable text. I wonder why the text needs to be
> red in the first place.
> What's wrong with the user's preferred color for
> disabled windows?
> 
> -- 
> Rob
> 
> 
> 



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

Reply via email to