Don't create the fonts until after they are needed (after the App
object has been created.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,10 +65,10 @@ class ScrolledMessageDialog(wxDialog):
|
||||
wxDialog.__init__(self, parent, -1, caption, pos, size)
|
||||
text = wxTextCtrl(self, -1, msg, wxDefaultPosition,
|
||||
wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY)
|
||||
text.SetFont(modernFont)
|
||||
text.SetFont(g.modernFont())
|
||||
dc = wxWindowDC(text)
|
||||
# !!! possible bug - GetTextExtent without font returns sysfont dims
|
||||
w, h = dc.GetFullTextExtent(' ', modernFont)[:2]
|
||||
w, h = dc.GetFullTextExtent(' ', g.modernFont())[:2]
|
||||
ok = wxButton(self, wxID_OK, "OK")
|
||||
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
||||
text.SetSize((w * 80 + 30, h * 40))
|
||||
|
Reference in New Issue
Block a user