Gnumed.wxGladeWidgets.wxgIssueSelectionDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgIssueSelectionDlg

     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 wxgIssueSelectionDlg(wx.Dialog):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgIssueSelectionDlg.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
    20                  wx.Dialog.__init__(self, *args, **kwds)
    21                  self.SetSize((300, 150))
    22                  self._lbl_message = wx.StaticText(self, wx.ID_ANY, _("Please select a health issue:"))
    23                  from Gnumed.wxpython.gmEMRStructWidgets import cIssueSelectionPhraseWheel
    24                  self._PhWheel_issue = cIssueSelectionPhraseWheel(self, wx.ID_ANY)
    25                  self._BTN_OK = wx.Button(self, wx.ID_OK, _("OK"))
    26                  self._BTN_dismiss = wx.Button(self, wx.ID_CANCEL, _("Close"))
    27
    28                  self.__set_properties()
    29                  self.__do_layout()
    30
    31                  self.Bind(wx.EVT_BUTTON, self._on_OK_button_pressed, id=wx.ID_OK)
    32                  # end wxGlade
    33
    34 -        def __set_properties(self):
    35                  # begin wxGlade: wxgIssueSelectionDlg.__set_properties
    36                  self.SetTitle(_("Health issue selector"))
    37                  self.SetSize((300, 150))
    38                  self._PhWheel_issue.SetFocus()
    39                  self._BTN_OK.SetDefault()
    40                  # end wxGlade
    41
    42 -        def __do_layout(self):
    43                  # begin wxGlade: wxgIssueSelectionDlg.__do_layout
    44                  _szr_main = wx.BoxSizer(wx.VERTICAL)
    45                  _szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    46                  _szr_main.Add(self._lbl_message, 1, wx.ALL | wx.EXPAND, 3)
    47                  _szr_main.Add(self._PhWheel_issue, 0, wx.EXPAND, 0)
    48                  _szr_buttons.Add(self._BTN_OK, 0, 0, 0)
    49                  _szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    50                  _szr_buttons.Add(self._BTN_dismiss, 0, 0, 0)
    51                  _szr_main.Add(_szr_buttons, 0, wx.EXPAND, 0)
    52                  self.SetSizer(_szr_main)
    53                  self.Layout()
    54                  self.Centre()
    55                  # end wxGlade
    56
    57 -        def _on_OK_button_pressed(self, event):  # wxGlade: wxgIssueSelectionDlg.<event_handler>
    58                  print("Event handler '_on_OK_button_pressed' not implemented!")
    59                  event.Skip()
    60
    61  # end of class wxgIssueSelectionDlg
    62