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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPersonNameEAPnl

     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 wxgPersonNameEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgPersonNameEAPnl.__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.gmDemographicsWidgets import cFirstnamePhraseWheel
    22                  self._PRW_firstname = cFirstnamePhraseWheel(self, wx.ID_ANY, "")
    23                  from Gnumed.wxpython.gmDemographicsWidgets import cLastnamePhraseWheel
    24                  self._PRW_lastname = cLastnamePhraseWheel(self, wx.ID_ANY, "")
    25                  from Gnumed.wxpython.gmDemographicsWidgets import cNicknamePhraseWheel
    26                  self._PRW_nick = cNicknamePhraseWheel(self, wx.ID_ANY, "")
    27                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")
    28                  self._CHBOX_active = wx.CheckBox(self, wx.ID_ANY, _("Active name"))
    29
    30                  self.__set_properties()
    31                  self.__do_layout()
    32                  # end wxGlade
    33
    34 -        def __set_properties(self):
    35                  # begin wxGlade: wxgPersonNameEAPnl.__set_properties
    36                  self.SetScrollRate(10, 10)
    37                  self._TCTRL_comment.SetToolTip(_("Enter a comment relevant to this name (such as \"before marriage\")."))
    38                  self._CHBOX_active.SetToolTip(_("Check this to make this the currently active name."))
    39                  # end wxGlade
    40
    41 -        def __do_layout(self):
    42                  # begin wxGlade: wxgPersonNameEAPnl.__do_layout
    43                  _gszr_main = wx.FlexGridSizer(5, 2, 3, 5)
    44                  __LBL_firstname = wx.StaticText(self, wx.ID_ANY, _("First name"))
    45                  _gszr_main.Add(__LBL_firstname, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    46                  _gszr_main.Add(self._PRW_firstname, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    47                  __LBL_lastname = wx.StaticText(self, wx.ID_ANY, _("Last name"))
    48                  _gszr_main.Add(__LBL_lastname, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    49                  _gszr_main.Add(self._PRW_lastname, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    50                  __LBL_preferred = wx.StaticText(self, wx.ID_ANY, _("Nick name"))
    51                  _gszr_main.Add(__LBL_preferred, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    52                  _gszr_main.Add(self._PRW_nick, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    53                  __LBL_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    54                  _gszr_main.Add(__LBL_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    55                  _gszr_main.Add(self._TCTRL_comment, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    56                  _gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    57                  _gszr_main.Add(self._CHBOX_active, 0, wx.ALIGN_CENTER_VERTICAL, 10)
    58                  self.SetSizer(_gszr_main)
    59                  _gszr_main.Fit(self)
    60                  _gszr_main.AddGrowableCol(1)
    61                  self.Layout()
    62                  # end wxGlade
    63
    64  # end of class wxgPersonNameEAPnl
    65