1 """GNUmed TextCtrl sbuclass."""
2
3 __author__ = "K. Hilbert <Karsten.Hilbert@gmx.net>"
4 __license__ = "GPL v2 or later (details at http://www.gnu.org)"
5
6 import logging
7 import sys
8
9
10 import wx
11
12
13 if __name__ == '__main__':
14 sys.path.insert(0, '../../')
15
16 from Gnumed.wxpython import gmKeywordExpansionWidgets
17
18
19 _log = logging.getLogger('gm.txtctrl')
20
21
22 -class cTextCtrl(wx.TextCtrl, gmKeywordExpansionWidgets.cKeywordExpansion_TextCtrlMixin):
23
24 - def __init__(self, *args, **kwargs):
29
30
31
32
33 if __name__ == '__main__':
34
35 if len(sys.argv) < 2:
36 sys.exit()
37
38 if sys.argv[1] != u'test':
39 sys.exit()
40
41 from Gnumed.pycommon import gmI18N
42 gmI18N.activate_locale()
43 gmI18N.install_domain(domain='gnumed')
44
45
47 app = wx.PyWidgetTester(size = (200, 50))
48 tc = cTextCtrl(parent = app.frame, id = -1)
49
50 app.frame.Show(True)
51 app.MainLoop()
52 return True
53
54 test_gm_textctrl()
55
56
57