Gnumed.wxGladeWidgets.wxgAddressSelectionDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgAddressSelectionDlg

     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  from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel
    14  # end wxGlade
    15
    16
    17 -class wxgAddressSelectionDlg(wx.Dialog):
    18 -        def __init__(self, *args, **kwds):
    19                  # begin wxGlade: wxgAddressSelectionDlg.__init__
    20                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
    21                  wx.Dialog.__init__(self, *args, **kwds)
    22                  self._LBL_msg = wx.StaticText(self, wx.ID_ANY, _("Select the address you want to use:"))
    23                  self._PRW_address_searcher = cAddressPhraseWheel(self, wx.ID_ANY, "")
    24                  self._BTN_manage_addresses = wx.Button(self, wx.ID_ANY, _("&Manage"), style=wx.BU_EXACTFIT)
    25                  self._BTN_OK = wx.Button(self, wx.ID_OK, "")
    26                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
    27
    28                  self.__set_properties()
    29                  self.__do_layout()
    30
    31                  self.Bind(wx.EVT_BUTTON, self._on_manage_addresses_button_pressed, self._BTN_manage_addresses)
    32                  # end wxGlade
    33
    34 -        def __set_properties(self):
    35                  # begin wxGlade: wxgAddressSelectionDlg.__set_properties
    36                  self.SetTitle(_("Address selection"))
    37                  self._BTN_manage_addresses.SetToolTip(_("Manage addresses."))
    38                  self._BTN_OK.SetToolTip(_("Use the selected address."))
    39                  self._BTN_OK.SetDefault()
    40                  self._BTN_cancel.SetToolTip(_("Abort address selection."))
    41                  # end wxGlade
    42
    43 -        def __do_layout(self):
    44                  # begin wxGlade: wxgAddressSelectionDlg.__do_layout
    45                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    46                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    47                  __szr_middle = wx.BoxSizer(wx.HORIZONTAL)
    48                  __szr_main.Add(self._LBL_msg, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
    49                  __szr_middle.Add(self._PRW_address_searcher, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
    50                  __szr_middle.Add(self._BTN_manage_addresses, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    51                  __szr_main.Add(__szr_middle, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
    52                  __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
    53                  __szr_buttons.Add(self._BTN_OK, 0, 0, 0)
    54                  __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    55                  __szr_buttons.Add(self._BTN_cancel, 0, 0, 0)
    56                  __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
    57                  __szr_main.Add(__szr_buttons, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, 3)
    58                  self.SetSizer(__szr_main)
    59                  __szr_main.Fit(self)
    60                  self.Layout()
    61                  self.Centre()
    62                  # end wxGlade
    63
    64 -        def _on_manage_addresses_button_pressed(self, event):  # wxGlade: wxgAddressSelectionDlg.<event_handler>
    65                  print("Event handler '_on_manage_addresses_button_pressed' not implemented!")
    66                  event.Skip()
    67
    68  # end of class wxgAddressSelectionDlg
    69