wxPython and fonts

On different platforms wxPython different fonts. I would like to know:

  1. Do widgets have their own fonts or they use a global font initializes by wxPython system.
  2. How do I replace this global font with another one used by wxPython application at the begining?

Thanks

Prashant Saxena wrote:

On different platforms wxPython different fonts. I would like to know:

1. Do widgets have their own fonts or they use a global font
initializes by wxPython system.
2. How do I replace this global font with another one used by wxPython
application at the begining?

Each widget has its own font, but most of the time the initial value is
inherited from its parent. If you set a default font in your main
window frame (using self.SetFont) at the very beginning before you add
other controls, that will percolate down to the other controls.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Prashant,

On different platforms wxPython different fonts. I would like to know:

1. Do widgets have their own fonts or they use a global font initializes by wxPython system.
2. How do I replace this global font with another one used by wxPython application at the begining?

Thanks

See wx.Font. You should be able to use any currently installed font on your PC with it. Then in your widget, you call widget.SetFont(myFont)

Once again, see the docs:

http://www.wxpython.org/docs/api/wx.Font-class.html

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org