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