Hello,
I have tried all sorts of variants but still no success.
Below I suply a little demo prog that doesnt work as intended for me.
wxStaticText gets correct fontsize from parrent, but wxTextCtrl are always displayed with the default system font.
Perhaps somebody running wxPython on linux could test this and see if they get both controlls using the larger font size.
I have also tried to use SetFont directly on the childcontrols but no change. The only way that I have managed to get my wxTextCtrl to be of desired size is to use wxTE_MULTILINE and SetDefaultStyle
regards /Jacob Lundqvist
------- sample code ------
from wxPython.wx import *
# Tried to base this both on wxDialog and wxFrame,
# exactly same result
class FontTest(wxDialog):
def __init__(self, parent, id, title):
wxDialog.__init__(self, parent, -1, title)
font = wxFont( 20, wxDEFAULT, wxNORMAL, wxNORMAL )
self.SetFont(font)
l1 = wxStaticText(self, 10, 'label')
t1 = wxTextCtrl( self, 20,'text',pos=(0,25) )
self.Show(true)
class App(wxApp):
def OnInit(self):
w = FontTest(None, -1, 'wxtest' )
return true
app = App(0)
app.MainLoop()
------- Environment ---------
Distro: Mandrake 8.2
python-2.2-9mdk
wxGTK-2.3.2-1
wxGTK6-2.2.9-3mdk
wxGTK6-gl-2.2.9-3mdk
wxGTK-devel-2.3.2-1
wxGTK-gl-2.3.2-1
wxPython-2.3.2.1-1