Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the font on a wxPython TextCtrl widget

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?

like image 947
rectangletangle Avatar asked May 01 '11 22:05

rectangletangle


1 Answers

font1 = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas')
myTextCtrl.SetFont(font1)
like image 163
Stephen Terry Avatar answered Oct 23 '22 23:10

Stephen Terry