1
2
3
4
5 import wx
6
9
10 from Gnumed.wxpython import gmDataMiningWidgets
11
12
13 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
14 wx.ScrolledWindow.__init__(self, *args, **kwds)
15 self._lbl_msg = wx.StaticText(self, -1, _("Activate the respective patient by double-clicking a row."))
16 self._LCTRL_items = gmDataMiningWidgets.cPatientListingCtrl(self, -1, style=wx.LC_REPORT|wx.LC_HRULES|wx.LC_VRULES|wx.SIMPLE_BORDER)
17 self._BTN_1 = wx.Button(self, -1, "")
18 self._BTN_2 = wx.Button(self, -1, "")
19 self._BTN_3 = wx.Button(self, -1, "")
20 self._BTN_4 = wx.Button(self, -1, "")
21 self._BTN_5 = wx.Button(self, -1, "")
22
23 self.__set_properties()
24 self.__do_layout()
25
26 self.Bind(wx.EVT_BUTTON, self._on_BTN_1_pressed, self._BTN_1)
27 self.Bind(wx.EVT_BUTTON, self._on_BTN_2_pressed, self._BTN_2)
28 self.Bind(wx.EVT_BUTTON, self._on_BTN_3_pressed, self._BTN_3)
29 self.Bind(wx.EVT_BUTTON, self._on_BTN_4_pressed, self._BTN_4)
30 self.Bind(wx.EVT_BUTTON, self._on_BTN_5_pressed, self._BTN_5)
31
32
34
35 self.SetScrollRate(10, 10)
36 self._BTN_1.Enable(False)
37 self._BTN_2.Enable(False)
38 self._BTN_3.Enable(False)
39 self._BTN_4.Enable(False)
40 self._BTN_5.Enable(False)
41
42
44
45 __szr_main = wx.BoxSizer(wx.VERTICAL)
46 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
47 __szr_main.Add(self._lbl_msg, 0, wx.ALL|wx.EXPAND, 5)
48 __szr_main.Add(self._LCTRL_items, 1, wx.ALL|wx.EXPAND, 5)
49 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
50 __szr_buttons.Add(self._BTN_1, 0, wx.RIGHT|wx.EXPAND, 5)
51 __szr_buttons.Add(self._BTN_2, 0, wx.RIGHT|wx.EXPAND, 5)
52 __szr_buttons.Add(self._BTN_3, 0, wx.RIGHT|wx.EXPAND, 5)
53 __szr_buttons.Add(self._BTN_4, 0, wx.RIGHT|wx.EXPAND, 5)
54 __szr_buttons.Add(self._BTN_5, 0, wx.EXPAND, 5)
55 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
56 __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 5)
57 self.SetSizer(__szr_main)
58 __szr_main.Fit(self)
59
60
62 print "Event handler `_on_BTN_1_pressed' not implemented"
63 event.Skip()
64
66 print "Event handler `_on_BTN_2_pressed' not implemented"
67 event.Skip()
68
70 print "Event handler `_on_BTN_3_pressed' not implemented"
71 event.Skip()
72
74 print "Event handler `_on_BTN_4_pressed' not implemented"
75 event.Skip()
76
78 print "Event handler `_on_BTN_5_pressed' not implemented"
79 event.Skip()
80
81
82