I am trying to make a primitive table
in my textbox. This requires me to use a font like Courier New where all
characters have the same spacing, I am attempting to do this with the following
lines of code:
self.display = wx.TextCtrl(self, wx.ID_ANY,
“”, style=wx.TE_READONLY|wx.TE_MULTILINE|wx.HSCROLL, size=(500,500))
self.display.SetDefaultStyle(wx.TextAttr(font=wx.Font(10,wx.FONTFAMILY_MODERN,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_NORMAL,
faceName=“Courier New”)))
However, it seems that the second line
of code is being ignored, as whenever I add anything to it (using self.display.AppendText()
) it displays the same way it did without the line in my code.
I do clear the textbox with self.display.Clear(),
though I doubt this would clear the defaults, I would assume only the text.
Thanks for any help.
-Brian
Brian Fett
1280 Disc Dr
SHK224
Shakopee, MN 55379
Phone: (952)402-2595