I am interisted in changing the font to a larger font like SWISS, 22. it apears that the styledTextCtrl Fonts work difrent than the TextCtrl fonts. How can I change the font?
Text Program.py (592 Bytes)
I am interisted in changing the font to a larger font like SWISS, 22. it apears that the styledTextCtrl Fonts work difrent than the TextCtrl fonts. How can I change the font?
Text Program.py (592 Bytes)
I am interisted in changing the font to a larger font like
SWISS, 22. it apears that the styledTextCtrl Fonts work
difrent than the TextCtrl fonts. How can I change the font?
The wxStyledTextCtrl has a bit of a learning curve. Take a look at
http://www.yellowbrain.com/stc/index.html for everything you'll event need
to know about the wxStyledTextCtrl.
David
Walter Igo wrote:
I am interisted in changing the font to a larger font like SWISS, 22. it apears that the styledTextCtrl Fonts work difrent than the TextCtrl fonts. How can I change the font?
The StyleTextCtrl is built around the concept of styles, so changing the default font means changing the default style.
import wx
import wx.stc as stcclass MySTC(stc.StyledTextCtrl):
def __init__(self, parent, size=wx.DefaultSize,menu=None):
text=stc.StyledTextCtrl.__init__(self, parent)
self.SetMarginType(0,0)
self.SetMargins(30,30)
self.SetMarginWidth(1,0)
self.SetWrapMode(1)
self.StyleSetFont(stc.STC_STYLE_DEFAULT, wx.Font(22, wx.SWISS, wx.NORMAL, wx.NORMAL))
self.StyleClearAll()
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!