I'd like to set the font of a wx.TextCtrl widget to Consolas, or at least another monospaced font. How would I go about this?
Asked
Active
Viewed 1.1k times
1 Answers
23
font1 = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas')
myTextCtrl.SetFont(font1)

Stephen Terry
- 6,169
- 1
- 28
- 31
-
2For more information on fonts and how to apply them, check out http://www.blog.pythonlibrary.org/2011/04/28/wxpython-learning-to-use-fonts/ – Mike Driscoll May 02 '11 at 17:20