1
2
3
4
5
6 import wx
7
8
9 import gettext
10
11
12
13
14
15
18
19 wx.Panel.__init__(self, *args, **kwds)
20 self._BTN_list = wx.Button(self, wx.ID_ANY, _("&L"), style=wx.BU_EXACTFIT)
21 self._TCTRL_encounter = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
22 self._BTN_new = wx.Button(self, wx.ID_ANY, _("&N"), style=wx.BU_EXACTFIT)
23
24 self.__set_properties()
25 self.__do_layout()
26
27 self.Bind(wx.EVT_BUTTON, self._on_list_button_pressed, self._BTN_list)
28 self.Bind(wx.EVT_BUTTON, self._on_new_button_pressed, self._BTN_new)
29
30
32
33 self._BTN_list.SetToolTip(_("List all encounters."))
34 self._TCTRL_encounter.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
35 self._TCTRL_encounter.SetToolTip(_("The encounter."))
36 self._BTN_new.SetToolTip(_("Start a new encounter for the active patient."))
37
38
40
41 __szr_main = wx.BoxSizer(wx.HORIZONTAL)
42 __szr_main.Add(self._BTN_list, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
43 __szr_main.Add(self._TCTRL_encounter, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
44 __szr_main.Add(self._BTN_new, 0, wx.ALIGN_CENTER_VERTICAL, 1)
45 self.SetSizer(__szr_main)
46 __szr_main.Fit(self)
47 self.Layout()
48
49
51 print("Event handler '_on_list_button_pressed' not implemented!")
52 event.Skip()
53
55 print("Event handler '_on_new_button_pressed' not implemented!")
56 event.Skip()
57
58
59