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

# Source Code for Module Gnumed.wxGladeWidgets.wxgOrgUnitEAPnl

     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 wxgOrgUnitEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgOrgUnitEAPnl.__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 cOrganizationPhraseWheel
    22                  self._PRW_org = cOrganizationPhraseWheel(self, wx.ID_ANY, "")
    23                  from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
    24                  self._PRW_unit = cOrgUnitPhraseWheel(self, wx.ID_ANY, "")
    25                  from Gnumed.wxpython.gmOrganizationWidgets import cOrgCategoryPhraseWheel
    26                  self._PRW_category = cOrgCategoryPhraseWheel(self, wx.ID_ANY, "")
    27
    28                  self.__set_properties()
    29                  self.__do_layout()
    30                  # end wxGlade
    31
    32 -        def __set_properties(self):
    33                  # begin wxGlade: wxgOrgUnitEAPnl.__set_properties
    34                  self.SetScrollRate(10, 10)
    35                  self._PRW_org.SetToolTip(_("The organization this unit belongs to."))
    36                  self._PRW_unit.SetToolTip(_("The name of the organizational unit."))
    37                  self._PRW_category.SetToolTip(_("The category of the organizational unit."))
    38                  # end wxGlade
    39
    40 -        def __do_layout(self):
    41                  # begin wxGlade: wxgOrgUnitEAPnl.__do_layout
    42                  _gszr_main = wx.FlexGridSizer(3, 2, 1, 3)
    43                  __lbl_org = wx.StaticText(self, wx.ID_ANY, _("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.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    47                  __lbl_unit = wx.StaticText(self, wx.ID_ANY, _("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.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    51                  __lbl_category = wx.StaticText(self, wx.ID_ANY, _("Category"))
    52                  _gszr_main.Add(__lbl_category, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    53                  _gszr_main.Add(self._PRW_category, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    54                  self.SetSizer(_gszr_main)
    55                  _gszr_main.Fit(self)
    56                  _gszr_main.AddGrowableCol(1)
    57                  self.Layout()
    58                  # end wxGlade
    59
    60  # end of class wxgOrgUnitEAPnl
    61