1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 from Gnumed.wxpython.gmOrganizationWidgets import cOrganizationPhraseWheel
16 from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
17 from Gnumed.wxpython.gmOrganizationWidgets import cOrgCategoryPhraseWheel
18 from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel
19 from Gnumed.wxpython.gmAddressWidgets import cAddressEditAreaPnl
20
21
22 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
23 wx.ScrolledWindow.__init__(self, *args, **kwds)
24 self._PRW_org = cOrganizationPhraseWheel(self, -1, "", style=wx.NO_BORDER)
25 self._PRW_unit = cOrgUnitPhraseWheel(self, -1, "", style=wx.NO_BORDER)
26 self._PRW_category = cOrgCategoryPhraseWheel(self, -1, "", style=wx.NO_BORDER)
27
28 self.__set_properties()
29 self.__do_layout()
30
31
33
34 self.SetScrollRate(10, 10)
35 self._PRW_org.SetToolTipString(_("The organization this unit belongs to."))
36 self._PRW_unit.SetToolTipString(_("The name of the organizational unit."))
37 self._PRW_category.SetToolTipString(_("The category of the organizational unit."))
38
39
41
42 _gszr_main = wx.FlexGridSizer(3, 2, 1, 3)
43 __lbl_org = wx.StaticText(self, -1, _("Organization"))
44 __lbl_org.SetForegroundColour(wx.Colour(255, 0, 0))
45 _gszr_main.Add(__lbl_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
46 _gszr_main.Add(self._PRW_org, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
47 __lbl_unit = wx.StaticText(self, -1, _("Unit"))
48 __lbl_unit.SetForegroundColour(wx.Colour(255, 0, 0))
49 _gszr_main.Add(__lbl_unit, 0, wx.ALIGN_CENTER_VERTICAL, 0)
50 _gszr_main.Add(self._PRW_unit, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
51 __lbl_category = wx.StaticText(self, -1, _("Category"))
52 _gszr_main.Add(__lbl_category, 0, wx.ALIGN_CENTER_VERTICAL, 0)
53 _gszr_main.Add(self._PRW_category, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
54 self.SetSizer(_gszr_main)
55 _gszr_main.Fit(self)
56 _gszr_main.AddGrowableCol(1)
57
58
59
60