Setting font on wxMessageDialog

I can't manage to set the font for a wxMessageDialog. I have tried:

* using SetFont on the parent (a wxFrame) so that it will be
   inherited;

* using SetOwnFont on the dialog, before calling ShowModal; and

* calling Refresh on the dialog after each of the above.

What am I missing? The font I'm trying to set it to is okay, as it is
used elsewhere in the application.

Jamie

Jamie Norrish wrote:

I can't manage to set the font for a wxMessageDialog. I have tried:

* using SetFont on the parent (a wxFrame) so that it will be
   inherited;

* using SetOwnFont on the dialog, before calling ShowModal; and

* calling Refresh on the dialog after each of the above.

What am I missing?

On some platforms the wx.MessageDialog is not a true wx.Dialog, but just a wrapper around a platform API function. As such, any window attributes not supported by the API are just ignored. If you need to change the font then you need to derive your own dialog from wx.Dialog and handle it that way.

···

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