Vadim Zeitlin
unread,Oct 3, 2012, 12:20:52 PM10/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-...@googlegroups.com
On Wed, 3 Oct 2012 15:25:07 +0200 I wrote:
Me> I've just discovered, with some surprise, that wxStyledTextCtrl::SetFont()
Me> doesn't seem to do anything. To change the default font you apparently need
Me> to call StyleSetFont(wxSTC_STYLE_DEFAULT, font) as the stc sample does.
Next discovery: changing wxSTC_STYLE_DEFAULT is not enough in general, you
need to also change the styles used by the lexer. Unfortunately I didn't
find any better way to do this than setting font size for *all* styles,
i.e. for 256 of them if you use SetStyleBits(8). I am far from being sure
that this is correct so I won't do it in SetFont() by default. I'd like to
know if anybody knows of a better way to do this though.
Regards,
VZ