Gnumed.wxGladeWidgets.wxgSelectPersonFromListDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgSelectPersonFromListDlg

     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 wxgSelectPersonFromListDlg(wx.Dialog):
     8 -    def __init__(self, *args, **kwds):
     9
    10          from Gnumed.wxpython import gmListWidgets
    11
    12          # begin wxGlade: wxgSelectPersonFromListDlg.__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._LCTRL_persons = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES|wx.NO_BORDER)
    16          self._BTN_select = wx.Button(self, wx.ID_OK, _("Select"))
    17          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
    18
    19          self.__set_properties()
    20          self.__do_layout()
    21
    22          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_persons)
    23          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_list_item_activated, self._LCTRL_persons)
    24          # end wxGlade
    25
    26 -    def __set_properties(self):
    27          # begin wxGlade: wxgSelectPersonFromListDlg.__set_properties
    28          self.SetTitle(_("Select person from list"))
    29          self.SetSize((600, 400))
    30          self._LCTRL_persons.SetToolTipString(_("Displays the list of persons to select from."))
    31          self._LCTRL_persons.SetFocus()
    32          self._BTN_select.SetToolTipString(_("Select the person highlighted in the list above."))
    33          self._BTN_select.Enable(False)
    34          self._BTN_select.SetDefault()
    35          self._BTN_cancel.SetToolTipString(_("Cancel person selection."))
    36          # end wxGlade
    37
    38 -    def __do_layout(self):
    39          # begin wxGlade: wxgSelectPersonFromListDlg.__do_layout
    40          _szr_main = wx.BoxSizer(wx.VERTICAL)
    41          _szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    42          _lbl_message = wx.StaticText(self, -1, _("Please select a person from the list below."))
    43          _szr_main.Add(_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: wxgSelectPersonFromListDlg.<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: wxgSelectPersonFromListDlg.<event_handler>
    60          print "Event handler `_on_list_item_activated' not implemented"
    61          event.Skip()
    62
    63  # end of class wxgSelectPersonFromListDlg
    64