Gnumed.wxGladeWidgets.wxgGreetingEditorDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgGreetingEditorDlg

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  # generated by wxGlade 0.5 on Thu Sep 20 22:21:57 2007 from /home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgGreetingEditorDlg.wxg
     4
     5  import wx
     6
     7 -class wxgGreetingEditorDlg(wx.Dialog):
     8 -    def __init__(self, *args, **kwds):
     9          # begin wxGlade: wxgGreetingEditorDlg.__init__
    10          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
    11          wx.Dialog.__init__(self, *args, **kwds)
    12          self._TCTRL_message = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.HSCROLL)
    13          self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
    14          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
    15
    16          self.__set_properties()
    17          self.__do_layout()
    18
    19          self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
    20          # end wxGlade
    21
    22 -    def __set_properties(self):
    23          # begin wxGlade: wxgGreetingEditorDlg.__set_properties
    24          self.SetTitle(_("Database welcome message editor"))
    25          self.SetSize((400, 300))
    26          # end wxGlade
    27
    28 -    def __do_layout(self):
    29          # begin wxGlade: wxgGreetingEditorDlg.__do_layout
    30          __szr_main = wx.BoxSizer(wx.VERTICAL)
    31          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    32          _lbl_instructions = wx.StaticText(self, -1, _("Below you can edit the database welcome message shown at startup\nwhich allows you to identify the database you are connected to.\n\nTo disable that popup leave the message empty."), style=wx.ALIGN_CENTRE)
    33          __szr_main.Add(_lbl_instructions, 0, wx.ALL|wx.EXPAND, 5)
    34          __szr_main.Add(self._TCTRL_message, 1, wx.ALL|wx.EXPAND, 5)
    35          __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
    36          __szr_buttons.Add(self._BTN_save, 0, wx.RIGHT|wx.EXPAND, 3)
    37          __szr_buttons.Add(self._BTN_cancel, 0, wx.LEFT|wx.EXPAND, 3)
    38          __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
    39          __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 4)
    40          self.SetSizer(__szr_main)
    41          self.Layout()
    42          self.Centre()
    43          # end wxGlade
    44
    45 -    def _on_save_button_pressed(self, event): # wxGlade: wxgGreetingEditorDlg.<event_handler>
    46          print "Event handler `_on_save_button_pressed' not implemented!"
    47          event.Skip()
    48
    49  # end of class wxgGreetingEditorDlg
    50
    51
    52  if __name__ == "__main__":
    53      import gettext
    54      gettext.install("app") # replace with the appropriate catalog name
    55
    56      app = wx.PySimpleApp(0)
    57      wx.InitAllImageHandlers()
    58      dialog_1 = wxgGreetingEditorDlg(None, -1, "")
    59      app.SetTopWindow(dialog_1)
    60      dialog_1.Show()
    61      app.MainLoop()
    62