1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 kwds["style"] = wx.SIMPLE_BORDER|wx.TAB_TRAVERSAL
16 wx.Panel.__init__(self, *args, **kwds)
17 self._TCTRL_encounter = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY|wx.NO_BORDER)
18 self._BTN_new = wx.Button(self, -1, _("&N"), style=wx.BU_EXACTFIT)
19 self._BTN_list = wx.Button(self, -1, _("&L"), style=wx.BU_EXACTFIT)
20
21 self.__set_properties()
22 self.__do_layout()
23
24 self.Bind(wx.EVT_BUTTON, self._on_new_button_pressed, self._BTN_new)
25 self.Bind(wx.EVT_BUTTON, self._on_list_button_pressed, self._BTN_list)
26
27
29
30 self._TCTRL_encounter.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
31 self._TCTRL_encounter.SetToolTipString(_("The encounter."))
32 self._BTN_new.SetToolTipString(_("Start a new encounter for the active patient."))
33 self._BTN_list.SetToolTipString(_("List all encounters."))
34
35
37
38 __szr_main = wx.BoxSizer(wx.HORIZONTAL)
39 __szr_main.Add(self._TCTRL_encounter, 2, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 1)
40 __szr_main.Add(self._BTN_new, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 1)
41 __szr_main.Add(self._BTN_list, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 1)
42 self.SetSizer(__szr_main)
43 __szr_main.Fit(self)
44
45
47 print "Event handler `_on_new_button_pressed' not implemented!"
48 event.Skip()
49
51 print "Event handler `_on_list_button_pressed' not implemented!"
52 event.Skip()
53
54
55