1
2
3
4
5
6 import wx
7
8
9 import gettext
10
11
12
13
14
15
18
19 kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER | wx.STAY_ON_TOP
20 wx.Dialog.__init__(self, *args, **kwds)
21 from Gnumed.wxpython.gmEncounterWidgets import cEncounterEditAreaPnl
22 self._PNL_edit_area = cEncounterEditAreaPnl(self, wx.ID_ANY)
23 self._BTN_save = wx.Button(self, wx.ID_OK, _("&Save"))
24 self._BTN_close = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
25
26 self.__set_properties()
27 self.__do_layout()
28
29 self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, id=wx.ID_OK)
30
31
33
34 self.SetTitle(_("edit encounter details"))
35 self._BTN_save.SetToolTip(_("Save the encounter details."))
36 self._BTN_save.SetDefault()
37 self._BTN_close.SetToolTip(_("Close this dialog."))
38
39
41
42 __szr_main = wx.BoxSizer(wx.VERTICAL)
43 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
44 __szr_main.Add(self._PNL_edit_area, 1, wx.ALL | wx.EXPAND, 5)
45 __szr_buttons.Add(self._BTN_save, 0, wx.EXPAND, 0)
46 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
47 __szr_buttons.Add(self._BTN_close, 0, wx.EXPAND, 0)
48 __szr_main.Add(__szr_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
49 self.SetSizer(__szr_main)
50 __szr_main.Fit(self)
51 self.Layout()
52 self.Centre()
53
54
56 print("Event handler '_on_save_button_pressed' not implemented!")
57 event.Skip()
58
59
60