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

Source Code for Module Gnumed.wxGladeWidgets.wxgGenericAddressEditAreaPnl

  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 wxgGenericAddressEditAreaPnl(wx.ScrolledWindow):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxgGenericAddressEditAreaPnl.__init__ 19 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 20 wx.ScrolledWindow.__init__(self, *args, **kwds) 21 self._LBL_type = wx.StaticText(self, wx.ID_ANY, _("Type")) 22 from Gnumed.wxpython.gmAddressWidgets import cAddressTypePhraseWheel 23 self._PRW_type = cAddressTypePhraseWheel(self, wx.ID_ANY, "") 24 self._LBL_search = wx.StaticText(self, wx.ID_ANY, _("Search")) 25 from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel 26 self._PRW_address_searcher = cAddressPhraseWheel(self, wx.ID_ANY, "") 27 from Gnumed.wxpython.gmAddressWidgets import cZipcodePhraseWheel 28 self._PRW_zip = cZipcodePhraseWheel(self, wx.ID_ANY, "") 29 from Gnumed.wxpython.gmAddressWidgets import cStreetPhraseWheel 30 self._PRW_street = cStreetPhraseWheel(self, wx.ID_ANY, "") 31 self._TCTRL_notes_street = wx.TextCtrl(self, wx.ID_ANY, "") 32 self._TCTRL_number = wx.TextCtrl(self, wx.ID_ANY, "") 33 self._TCTRL_subunit = wx.TextCtrl(self, wx.ID_ANY, "") 34 from Gnumed.wxpython.gmAddressWidgets import cUrbPhraseWheel 35 self._PRW_urb = cUrbPhraseWheel(self, wx.ID_ANY, "") 36 from Gnumed.wxpython.gmAddressWidgets import cSuburbPhraseWheel 37 self._PRW_suburb = cSuburbPhraseWheel(self, wx.ID_ANY, "") 38 from Gnumed.wxpython.gmAddressWidgets import cStateSelectionPhraseWheel 39 self._PRW_state = cStateSelectionPhraseWheel(self, wx.ID_ANY, "") 40 from Gnumed.wxpython.gmAddressWidgets import cCountryPhraseWheel 41 self._PRW_country = cCountryPhraseWheel(self, wx.ID_ANY, "") 42 self._TCTRL_notes_subunit = wx.TextCtrl(self, wx.ID_ANY, "") 43 44 self.__set_properties() 45 self.__do_layout()
46 # end wxGlade 47
48 - def __set_properties(self):
49 # begin wxGlade: wxgGenericAddressEditAreaPnl.__set_properties 50 self.SetToolTip(_("Select the type of address here.")) 51 self.SetScrollRate(10, 10) 52 self._LBL_type.SetForegroundColour(wx.Colour(255, 0, 0)) 53 self._PRW_type.SetToolTip(_("The category under which to store this address.")) 54 self._PRW_address_searcher.SetToolTip(_("Here you can enter a postal code or street name fragment to search for an existing address.\n\nThe fields below will be filled with the details of that address which you can edit to create a new address.\n\nYou can also just enter the relevant information into the corresponding fields without searching for an existing address.")) 55 self._TCTRL_notes_street.SetToolTip(_("Enter any additional street level instructions and notes, such as postal box or driving directions.")) 56 self._TCTRL_number.SetToolTip(_("Enter the house number for this address.")) 57 self._TCTRL_subunit.SetToolTip(_("Enter the subunit / apartment / room / level / entrance for this address.")) 58 self._TCTRL_notes_subunit.SetToolTip(_("Enter any additional notes and comments on this address which didn't fit anywhere else."))
59 # end wxGlade 60
61 - def __do_layout(self):
62 # begin wxGlade: wxgGenericAddressEditAreaPnl.__do_layout 63 _gszr_main = wx.FlexGridSizer(10, 2, 3, 5) 64 __szr_urb = wx.BoxSizer(wx.HORIZONTAL) 65 _szr_number = wx.BoxSizer(wx.HORIZONTAL) 66 _gszr_main.Add(self._LBL_type, 0, wx.ALIGN_CENTER_VERTICAL, 0) 67 _gszr_main.Add(self._PRW_type, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 68 _gszr_main.Add(self._LBL_search, 0, wx.ALIGN_CENTER_VERTICAL, 0) 69 _gszr_main.Add(self._PRW_address_searcher, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 70 __LBL_zip = wx.StaticText(self, wx.ID_ANY, _("Zip code")) 71 __LBL_zip.SetForegroundColour(wx.Colour(255, 0, 0)) 72 _gszr_main.Add(__LBL_zip, 0, wx.ALIGN_CENTER_VERTICAL, 0) 73 _gszr_main.Add(self._PRW_zip, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 74 __LBL_street = wx.StaticText(self, wx.ID_ANY, _("Street")) 75 __LBL_street.SetForegroundColour(wx.Colour(255, 0, 0)) 76 _gszr_main.Add(__LBL_street, 0, wx.ALIGN_CENTER_VERTICAL, 0) 77 _gszr_main.Add(self._PRW_street, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 78 __LBL_street_notes = wx.StaticText(self, wx.ID_ANY, _("... Notes"), style=wx.ALIGN_RIGHT) 79 _gszr_main.Add(__LBL_street_notes, 0, wx.ALIGN_CENTER_VERTICAL, 0) 80 _gszr_main.Add(self._TCTRL_notes_street, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 81 __LBL_number = wx.StaticText(self, wx.ID_ANY, _("Number")) 82 __LBL_number.SetForegroundColour(wx.Colour(255, 0, 0)) 83 _gszr_main.Add(__LBL_number, 0, wx.ALIGN_CENTER_VERTICAL, 0) 84 _szr_number.Add(self._TCTRL_number, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 85 __LBL_subunit = wx.StaticText(self, wx.ID_ANY, _("Unit:")) 86 _szr_number.Add(__LBL_subunit, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5) 87 _szr_number.Add(self._TCTRL_subunit, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 88 _gszr_main.Add(_szr_number, 1, wx.EXPAND, 0) 89 __LBL_urb = wx.StaticText(self, wx.ID_ANY, _("Community")) 90 __LBL_urb.SetForegroundColour(wx.Colour(255, 0, 0)) 91 _gszr_main.Add(__LBL_urb, 0, wx.ALIGN_CENTER_VERTICAL, 0) 92 __szr_urb.Add(self._PRW_urb, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 93 __LBL_suburb = wx.StaticText(self, wx.ID_ANY, _("Suburb:")) 94 __szr_urb.Add(__LBL_suburb, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5) 95 __szr_urb.Add(self._PRW_suburb, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 96 _gszr_main.Add(__szr_urb, 1, wx.EXPAND, 0) 97 __LBL_state = wx.StaticText(self, wx.ID_ANY, _("Region")) 98 __LBL_state.SetForegroundColour(wx.Colour(255, 0, 0)) 99 _gszr_main.Add(__LBL_state, 0, wx.ALIGN_CENTER_VERTICAL, 0) 100 _gszr_main.Add(self._PRW_state, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 101 __LBL_country = wx.StaticText(self, wx.ID_ANY, _("Country")) 102 __LBL_country.SetForegroundColour(wx.Colour(255, 0, 0)) 103 _gszr_main.Add(__LBL_country, 0, wx.ALIGN_CENTER_VERTICAL, 0) 104 _gszr_main.Add(self._PRW_country, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 105 __LBL_notes_subunit = wx.StaticText(self, wx.ID_ANY, _("Comment")) 106 _gszr_main.Add(__LBL_notes_subunit, 0, wx.ALIGN_CENTER_VERTICAL, 0) 107 _gszr_main.Add(self._TCTRL_notes_subunit, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 108 self.SetSizer(_gszr_main) 109 _gszr_main.Fit(self) 110 _gszr_main.AddGrowableCol(1) 111 self.Layout()
112 # end wxGlade 113 114 # end of class wxgGenericAddressEditAreaPnl 115