开发者

Changing the font on a wxPython TextCtrl widget

开发者 https://www.devze.com 2023-03-01 18:21 出处:网络
I\'d like to set the font of a wx.TextCtr开发者_StackOverflowl widget to Consolas, or at least another monospaced font. How would I go about this? font1 = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL,

I'd like to set the font of a wx.TextCtr开发者_StackOverflowl widget to Consolas, or at least another monospaced font. How would I go about this?


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

精彩评论

暂无评论...
验证码 换一张
取 消