rectangletangle
rectangletangle

Reputation: 52921

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?

Upvotes: 15

Views: 11639

Answers (1)

Stephen Terry
Stephen Terry

Reputation: 6279

font1 = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas')
myTextCtrl.SetFont(font1)

Upvotes: 23

Related Questions