1
2
3
4
5 import wx
6
7
8
9
10
13
14 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
15
16
17 kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
18 wx.ScrolledWindow.__init__(self, *args, **kwds)
19 self._TCTRL_description = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
20 self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
21 self._TCTRL_tests = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE)
22 self._BTN_select_tests = wx.Button(self, wx.ID_ANY, _("&Manage..."), style=wx.BU_EXACTFIT)
23 self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
24
25 self.__set_properties()
26 self.__do_layout()
27
28 self.Bind(wx.EVT_BUTTON, self._on_select_tests_button_pressed, self._BTN_select_tests)
29
30
32
33 self.SetScrollRate(10, 10)
34 self._TCTRL_description.SetToolTipString(_("A short description for this test panel."))
35 self._TCTRL_comment.SetToolTipString(_("A comment on, or long-form description of, this test panel."))
36 self._TCTRL_tests.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
37 self._TCTRL_tests.Enable(False)
38 self._BTN_select_tests.SetToolTipString(_("Manage which test types are members of this panel (battery)."))
39 self._PRW_codes.SetToolTipString(_("Codes relevant to this test panel\nseparated by \";\"."))
40
41
43
44 _gszr_main = wx.FlexGridSizer(4, 2, 1, 3)
45 __szr_tests = wx.BoxSizer(wx.HORIZONTAL)
46 __lbl_description = wx.StaticText(self, wx.ID_ANY, _("Description"))
47 _gszr_main.Add(__lbl_description, 0, wx.ALIGN_CENTER_VERTICAL, 0)
48 _gszr_main.Add(self._TCTRL_description, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
49 __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
50 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
51 _gszr_main.Add(self._TCTRL_comment, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
52 __lbl_tests = wx.StaticText(self, wx.ID_ANY, _("Test types"))
53 _gszr_main.Add(__lbl_tests, 0, wx.TOP, 2)
54 __szr_tests.Add(self._TCTRL_tests, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
55 __szr_tests.Add(self._BTN_select_tests, 0, wx.TOP, 2)
56 _gszr_main.Add(__szr_tests, 1, wx.EXPAND, 0)
57 __lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes"))
58 _gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
59 _gszr_main.Add(self._PRW_codes, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
60 self.SetSizer(_gszr_main)
61 _gszr_main.Fit(self)
62 _gszr_main.AddGrowableRow(2)
63 _gszr_main.AddGrowableCol(1)
64
65
67 print "Event handler `_on_select_tests_button_pressed' not implemented!"
68 event.Skip()
69
70
71