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

# Source Code for Module Gnumed.wxGladeWidgets.wxgGreetingEditorDlg

     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 wxgGreetingEditorDlg(wx.Dialog):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgGreetingEditorDlg.__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((400, 300))
    22                  self._TCTRL_message = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.HSCROLL | wx.TE_MULTILINE)
    23                  self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
    24                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
    25
    26                  self.__set_properties()
    27                  self.__do_layout()
    28
    29                  self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
    30                  # end wxGlade
    31
    32 -        def __set_properties(self):
    33                  # begin wxGlade: wxgGreetingEditorDlg.__set_properties
    34                  self.SetTitle(_("Database welcome message editor"))
    35                  self.SetSize((400, 300))
    36                  # end wxGlade
    37
    38 -        def __do_layout(self):
    39                  # begin wxGlade: wxgGreetingEditorDlg.__do_layout
    40                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    41                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    42                  _lbl_instructions = wx.StaticText(self, wx.ID_ANY, _("Below you can edit the database welcome message shown at startup which allows you to identify the database you are connected to.\n\nTo disable that popup leave the message empty."), style=wx.ALIGN_CENTER)
    43                  __szr_main.Add(_lbl_instructions, 0, wx.ALL | wx.EXPAND, 5)
    44                  __szr_main.Add(self._TCTRL_message, 1, wx.ALL | wx.EXPAND, 5)
    45                  __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    46                  __szr_buttons.Add(self._BTN_save, 0, wx.EXPAND | wx.RIGHT, 3)
    47                  __szr_buttons.Add(self._BTN_cancel, 0, wx.EXPAND | wx.LEFT, 3)
    48                  __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    49                  __szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 4)
    50                  self.SetSizer(__szr_main)
    51                  self.Layout()
    52                  self.Centre()
    53                  # end wxGlade
    54
    55 -        def _on_save_button_pressed(self, event):  # wxGlade: wxgGreetingEditorDlg.<event_handler>
    56                  print("Event handler '_on_save_button_pressed' not implemented!")
    57                  event.Skip()
    58
    59  # end of class wxgGreetingEditorDlg
    60