SystemBrushes and SystemPens

  • Thread starter Thread starter Larry Lard
  • Start date Start date
L

Larry Lard

Does anyone know why there is a mismatch between the colours to be
found in SystemBrushes and those to be found in SystemPens? For
example, there is a SystemPens.GrayText but there isn't a
SystemBrushes.GrayText.

In total there are 21 SystemBrushes, but only 15 SystemPens (not a
simple subset though). One might think, "the Pens are for colours you
might want to draw with, whereas the Brushes are for colours you might
want to paint with" - but you DrawString with a Brush, and so there
should be a GrayText Brush, shouldn't there?
 
Aha! On checking the 2005 docs online, I see that there *is* a
SystemBrushes.GrayText in framework 2.0, so it would appear I wasn't
the first person to spot this one :) In fact a quick scan suggests that
there is now a SystemBrushes and SystemPens member for every
SystemColor. So there's my fix.
 
Back
Top