1
2
3
4
5 import wx
6
9
10 from Gnumed.wxpython import gmPersonContactWidgets
11
12
13 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
14 wx.ScrolledWindow.__init__(self, *args, **kwds)
15 self._PRW_type = gmPersonContactWidgets.cCommChannelTypePhraseWheel(self, -1, "", style=wx.NO_BORDER)
16 self._TCTRL_url = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
17 self._PRW_address = gmPersonContactWidgets.cAddressPhraseWheel(self, -1, "", style=wx.NO_BORDER)
18 self._CHBOX_confidential = wx.CheckBox(self, -1, _("Confidential"))
19
20 self.__set_properties()
21 self.__do_layout()
22
23
25
26 self.SetScrollRate(10, 10)
27 self._TCTRL_url.SetToolTipString(_("Enter the address or number for this communications channel here."))
28 self._PRW_address.SetToolTipString(_("Optional: The address this communication channel is associated with."))
29 self._PRW_address.Enable(False)
30 self._CHBOX_confidential.SetToolTipString(_("Check this if the communications channel is to be treated confidentially."))
31
32
34
35 _gszr_main = wx.FlexGridSizer(10, 2, 3, 5)
36 __LBL_type = wx.StaticText(self, -1, _("Channel"))
37 _gszr_main.Add(__LBL_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
38 _gszr_main.Add(self._PRW_type, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
39 __LBL_url = wx.StaticText(self, -1, _("Value"))
40 _gszr_main.Add(__LBL_url, 0, wx.ALIGN_CENTER_VERTICAL, 0)
41 _gszr_main.Add(self._TCTRL_url, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
42 __LBL_address = wx.StaticText(self, -1, _("Address"))
43 _gszr_main.Add(__LBL_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
44 _gszr_main.Add(self._PRW_address, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
45 __LBL_options = wx.StaticText(self, -1, "")
46 _gszr_main.Add(__LBL_options, 0, wx.ALIGN_CENTER_VERTICAL, 0)
47 _gszr_main.Add(self._CHBOX_confidential, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
48 self.SetSizer(_gszr_main)
49 _gszr_main.Fit(self)
50 _gszr_main.AddGrowableCol(1)
51
52
53
54