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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSelectPersonDTOFromListDlg

     1  #!/usr/bin/env python
     2  # -*- coding: ISO-8859-15 -*-
     3  # generated by wxGlade 0.4.1 on Sun Jul 23 20:01:01 2006
     4
     5  import wx
     6
     7 -class wxgSelectPersonDTOFromListDlg(wx.Dialog):
     8 -    def __init__(self, *args, **kwds):
     9
    10          from Gnumed.wxpython import gmListWidgets
    11
    12          # begin wxGlade: wxgSelectPersonDTOFromListDlg.__init__
    13          kwds["style"] = wx.CAPTION|wx.RESIZE_BORDER|wx.CLOSE_BOX|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
    14          wx.Dialog.__init__(self, *args, **kwds)
    15          self._lbl_message = wx.StaticText(self, -1, _("Please select a person from the list below."))
    16          self._LCTRL_persons = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES|wx.NO_BORDER)
    17          self._BTN_select = wx.Button(self, wx.ID_OK, _("Select"))
    18          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
    19
    20          self.__set_properties()
    21          self.__do_layout()
    22
    23          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_persons)
    24          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_list_item_activated, self._LCTRL_persons)
    25          # end wxGlade
    26
    27 -    def __set_properties(self):
    28          # begin wxGlade: wxgSelectPersonDTOFromListDlg.__set_properties
    29          self.SetTitle(_("Select person from list"))
    30          self.SetSize((600, 400))
    31          self._LCTRL_persons.SetToolTipString(_("Displays the list of persons to select from."))
    32          self._LCTRL_persons.SetFocus()
    33          self._BTN_select.SetToolTipString(_("Select the person highlighted in the list above."))
    34          self._BTN_select.Enable(False)
    35          self._BTN_select.SetDefault()
    36          self._BTN_cancel.SetToolTipString(_("Cancel person selection."))
    37          # end wxGlade
    38
    39 -    def __do_layout(self):
    40          # begin wxGlade: wxgSelectPersonDTOFromListDlg.__do_layout
    41          _szr_main = wx.BoxSizer(wx.VERTICAL)
    42          _szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    43          _szr_main.Add(self._lbl_message, 0, wx.EXPAND, 0)
    44          _szr_main.Add(self._LCTRL_persons, 1, wx.EXPAND, 0)
    45          _szr_buttons.Add((20, 20), 1, 0, 0)
    46          _szr_buttons.Add(self._BTN_select, 0, 0, 0)
    47          _szr_buttons.Add(self._BTN_cancel, 0, 0, 0)
    48          _szr_main.Add(_szr_buttons, 0, wx.EXPAND, 0)
    49          self.SetAutoLayout(True)
    50          self.SetSizer(_szr_main)
    51          self.Layout()
    52          self.Centre()
    53          # end wxGlade
    54
    55 -    def _on_list_item_selected(self, event): # wxGlade: wxgSelectPersonDTOFromListDlg.<event_handler>
    56          print "Event handler `_on_list_item_selected' not implemented"
    57          event.Skip()
    58
    59 -    def _on_list_item_activated(self, event): # wxGlade: wxgSelectPersonDTOFromListDlg.<event_handler>
    60          print "Event handler `_on_list_item_activated' not implemented"
    61          event.Skip()
    62
    63  # end of class wxgSelectPersonDTOFromListDlg
    64