Changing the font colour

Hi,

Sorry for this question that seems so simple, but ... I searched about this
and don't find the answer..

There isn't any method in the wxFont object.
I thought I could use the wxFontData one but I don't know how to pass from the
wxFont one to the wxFontData one

So... did somebody know how to change the font colour?

Thanks,
-philippe

Philippe Ney wrote:

Hi,

Sorry for this question that seems so simple, but ... I searched about this
and don't find the answer..

There isn't any method in the wxFont object.
I thought I could use the wxFontData one but I don't know how to pass from the
wxFont one to the wxFontData one

So... did somebody know how to change the font colour?

wxFonts themselves don't have a colour, but they can be drawn with one. So it is up to the specific control, (or your own drawing functions) to draw the text with the desried colour. For example most windows will draw text with the color specified by calling the window's SetForegroundColour method.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

> Hi,
>
> Sorry for this question that seems so simple, but ... I searched about
> this and don't find the answer..
>
> There isn't any method in the wxFont object.
> I thought I could use the wxFontData one but I don't know how to pass from
> the wxFont one to the wxFontData one
>
> So... did somebody know how to change the font colour?
>

wxFonts themselves don't have a colour, but they can be drawn with one.
  So it is up to the specific control, (or your own drawing functions)
to draw the text with the desried colour. For example most windows will
draw text with the color specified by calling the window's
SetForegroundColour method.

Yes.
I use SetBackgroundColour... and I missed SetForegroundColour.. tss, tss, tss

Thanks Robin.
-philippe