Opened 21 months ago

Closed 20 months ago

Last modified 20 months ago

#15056 closed defect (fixed)

SetFont() broken in wxDataViewCtrl

Reported by: lpoujoulat Owned by:
Priority: normal Milestone:
Component: wxMSW Version: stable-latest
Keywords: wxDataViewCtrl font Cc:
Blocked By: Blocking:
Patch: yes


The wxDataViewCtrl actual font does not change if SetFont() is called after the window creation. The strange thing is that despite the font not being displayed, the automatic column width is correctly computed.

If SetFont() is called before the widget creation, the actual font is correct.

I will try to make a patch for this soon.

I didn't try on other targets than Windows.



Attachments (1)

dataview_setfont.patch download (2.8 KB) - added by lpoujoulat 21 months ago.

Download all attachments as: .zip

Change History (4)

Changed 21 months ago by lpoujoulat

comment:1 Changed 21 months ago by lpoujoulat

  • Patch set

Here is the pach that allows to actually set the font of wxDataViewCtrl. I hope I didn't miss anything.


comment:2 Changed 20 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [73565]) Make wxGenericDataViewCtrl::SetFont() really work.

Do use the new font for the items display.

Closes #15056.

comment:3 Changed 20 months ago by VZ

(In [73601]) Fix crash on wxDataViewCtrl creation after r73565.

Initialize m_clientArea to NULL to avoid crash in SetFont() which is called
during the control creation.

This might still be not 100% correct as the initial font is not set at all for
the client area but at least it fixes the crash.

See #15056.

Note: See TracTickets for help on using tickets.