[wx-dev] inheriting window font and colour in wxWindowDC?

Robin Dunn robin at alldunn.com
Sat Jun 7 19:29:22 PDT 2008


Vadim Zeitlin wrote:
>  Hello,
> 
>  I have the impression we already discussed this before but I don't
> remember if anything was decided and I can't find anything in the archives
> so I'd like to ask again:
> 
>  Wouldn't it make sense if wxClientDC and wxWindowDC used the font and
> colours of the window automatically? I.e. call SetFont(win->GetFont()),
> SetTextForeground(win->GetForegroundColour()) and SetTextBackground(win->
> GetBackgroundColour()) and SetBackground(wxBrush(win->GetBackgroundColour()))
> when creating them?
> 
>  Doing this is very simple thanks to Robert's changes as creation of
> wxClient/WindowDC objects is now centralized in one place (for all ports).
> And except for possible efficiency considerations I really don't see any
> reason to not do this, IMO it's surprising that this doesn't happen.
> 

Makes sense to me.


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



More information about the wx-dev mailing list