Alex Rivera | Logout

Changing the font on a wxPython TextCtrl widget

Asked 2011-05-01T22:37:27.603
15

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?

Edit
Report

1 Answer

23
font1 = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas')
myTextCtrl.SetFont(font1)
answered 2011-05-01T22:56:43.840

Your Answer