def FillTextCtrl(self, textctrl, fname, srcdir='appdir'):
if srcdir == 'appdir':
fpath = appconstants.getapppath(fname)
else:
fpath = appconstants.getdatapath(fname)
try:
f = open(fpath, 'r')
except IOError:
fcontent = fname + filemissing + appconstants.AppURL
else:
fcontent = f.read()
textctrl.SetFont(self.font)
textctrl.SetValue(fcontent)
winDC = wx.ClientDC(textctrl)
width, height = winDC.GetTextExtent(text_82)
height *= 26
textctrl.SetMinSize(wx.Size(width, height))
评论列表
文章目录