1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 from Gnumed.wxpython import gmMeasurementWidgets
16 from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
17
18
19 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
20 wx.ScrolledWindow.__init__(self, *args, **kwds)
21 self._PRW_org_unit = cOrgUnitPhraseWheel(self, -1, "", style=wx.NO_BORDER)
22 self._BTN_manage_orgs = wx.Button(self, -1, _("&Manage orgs"), style=wx.BU_EXACTFIT)
23 self._TCTRL_contact = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
24 self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
25
26 self.__set_properties()
27 self.__do_layout()
28
29 self.Bind(wx.EVT_BUTTON, self._on_manage_orgs_button_pressed, self._BTN_manage_orgs)
30
31
33
34 self.SetScrollRate(10, 10)
35 self._BTN_manage_orgs.SetToolTipString(_("Manage all organizations."))
36 self._TCTRL_contact.SetToolTipString(_("A way of contacting this lab, ideally a direct clinical contact.\n\nThis will be shown in the tooltip of test results originating from this lab."))
37 self._TCTRL_comment.SetToolTipString(_("A comment on this lab."))
38
39
41
42 _gszr_main = wx.FlexGridSizer(3, 2, 1, 3)
43 __szr_org_details = wx.BoxSizer(wx.HORIZONTAL)
44 __lbl_org = wx.StaticText(self, -1, _("Org.Unit"))
45 __lbl_org.SetForegroundColour(wx.Colour(255, 0, 0))
46 _gszr_main.Add(__lbl_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
47 __szr_org_details.Add(self._PRW_org_unit, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
48 __szr_org_details.Add(self._BTN_manage_orgs, 0, wx.ALIGN_CENTER_VERTICAL, 0)
49 _gszr_main.Add(__szr_org_details, 1, wx.EXPAND, 0)
50 __lbl_contact = wx.StaticText(self, -1, _("Contact"))
51 _gszr_main.Add(__lbl_contact, 0, wx.ALIGN_CENTER_VERTICAL, 0)
52 _gszr_main.Add(self._TCTRL_contact, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
53 __lbl_comment = wx.StaticText(self, -1, _("Comment"))
54 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
55 _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
56 self.SetSizer(_gszr_main)
57 _gszr_main.Fit(self)
58 _gszr_main.AddGrowableCol(1)
59
60
62 print "Event handler `_on_manage_orgs_button_pressed' not implemented"
63 event.Skip()
64
65
66