Ticket #15056 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

SetFont() broken in wxDataViewCtrl

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

Description

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.

Regards

Laurent

Attachments

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

Change History

Changed 3 months ago by lpoujoulat

Changed 3 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.

Regards

Changed 3 months ago by VZ

  • status changed from new to closed
  • resolution set to fixed

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

Do use the new font for the items display.

Closes #15056.

Changed 3 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.