[wxMSW] Bug in virtual listctrl font handling

Mattia Barbon <mattia.barbon at libero.it> mattia.barbon at libero.it
Tue Aug 14 17:38:20 PDT 2007


  Hi,
I can reproduce the bug with wxWidgets 2.8.3; I do not have
a more recent version compiled under Windows (will check later today).

  I have a virtual list control where I use custom attributes (i.e.
I override OnGetItemAttr).  I found that in some cases the items
were not drawn.

  If the custom font used is (for example) wxITALIC_FONT, the list control
items are drawn correctly; if the custom font is created from a font
description string (obtained through GetNativeFontInfoDesc) the items
are not drawn; if I create the font from the same font description string and
call SetEncoding( wxFONTENCODING_SYSTEM ) on the font object then the list
control items are drawn with the correct font.

  I believe this happens because of the
if( font.GetEncoding() != wxFONTENCODING_SYSTEM ) condition
in wxListCtrl::HandleItemPrepaint.

  I will continue debugging later today, but I hope
somebody more knowledgeable can provide some directions
for where to continue looking.  Or can tell me this has
already been fixed...

Best regards,
Mattia





More information about the wx-dev mailing list