Package Gnumed :: Package wxGladeWidgets :: Module wxgMeasurementOrgEAPnl
[frames] | no frames]

Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementOrgEAPnl

 1  # -*- coding: UTF-8 -*- 
 2  # 
 3  # generated by wxGlade 
 4  # 
 5   
 6  import wx 
 7   
 8  # begin wxGlade: dependencies 
 9  import gettext 
10  # end wxGlade 
11   
12  # begin wxGlade: extracode 
13  # end wxGlade 
14   
15   
16 -class wxgMeasurementOrgEAPnl(wx.ScrolledWindow):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxgMeasurementOrgEAPnl.__init__ 19 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 20 wx.ScrolledWindow.__init__(self, *args, **kwds) 21 from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel 22 self._PRW_org_unit = cOrgUnitPhraseWheel(self, wx.ID_ANY, "") 23 self._BTN_manage_orgs = wx.Button(self, wx.ID_ANY, _("&Manage orgs"), style=wx.BU_EXACTFIT) 24 self._TCTRL_contact = wx.TextCtrl(self, wx.ID_ANY, "") 25 self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "") 26 27 self.__set_properties() 28 self.__do_layout() 29 30 self.Bind(wx.EVT_BUTTON, self._on_manage_orgs_button_pressed, self._BTN_manage_orgs)
31 # end wxGlade 32
33 - def __set_properties(self):
34 # begin wxGlade: wxgMeasurementOrgEAPnl.__set_properties 35 self.SetScrollRate(10, 10) 36 self._BTN_manage_orgs.SetToolTip(_("Manage all organizations.")) 37 self._TCTRL_contact.SetToolTip(_("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.")) 38 self._TCTRL_comment.SetToolTip(_("A comment on this lab."))
39 # end wxGlade 40
41 - def __do_layout(self):
42 # begin wxGlade: wxgMeasurementOrgEAPnl.__do_layout 43 _gszr_main = wx.FlexGridSizer(3, 2, 1, 3) 44 __szr_org_details = wx.BoxSizer(wx.HORIZONTAL) 45 __lbl_org = wx.StaticText(self, wx.ID_ANY, _("Org.Unit")) 46 __lbl_org.SetForegroundColour(wx.Colour(255, 0, 0)) 47 _gszr_main.Add(__lbl_org, 0, wx.ALIGN_CENTER_VERTICAL, 0) 48 __szr_org_details.Add(self._PRW_org_unit, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 49 __szr_org_details.Add(self._BTN_manage_orgs, 0, wx.ALIGN_CENTER_VERTICAL, 0) 50 _gszr_main.Add(__szr_org_details, 1, wx.EXPAND, 0) 51 __lbl_contact = wx.StaticText(self, wx.ID_ANY, _("Contact")) 52 _gszr_main.Add(__lbl_contact, 0, wx.ALIGN_CENTER_VERTICAL, 0) 53 _gszr_main.Add(self._TCTRL_contact, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 54 __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment")) 55 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0) 56 _gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 57 self.SetSizer(_gszr_main) 58 _gszr_main.Fit(self) 59 _gszr_main.AddGrowableCol(1) 60 self.Layout()
61 # end wxGlade 62
63 - def _on_manage_orgs_button_pressed(self, event): # wxGlade: wxgMeasurementOrgEAPnl.<event_handler>
64 print("Event handler '_on_manage_orgs_button_pressed' not implemented!") 65 event.Skip()
66 67 # end of class wxgMeasurementOrgEAPnl 68