#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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

import wx

class wxgGreetingEditorDlg(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxgGreetingEditorDlg.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
        wx.Dialog.__init__(self, *args, **kwds)
        self._TCTRL_message = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.HSCROLL)
        self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
        self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgGreetingEditorDlg.__set_properties
        self.SetTitle(_("Database welcome message editor"))
        self.SetSize((400, 300))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgGreetingEditorDlg.__do_layout
        __szr_main = wx.BoxSizer(wx.VERTICAL)
        __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
        _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)
        __szr_main.Add(_lbl_instructions, 0, wx.ALL|wx.EXPAND, 5)
        __szr_main.Add(self._TCTRL_message, 1, wx.ALL|wx.EXPAND, 5)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
        __szr_buttons.Add(self._BTN_save, 0, wx.RIGHT|wx.EXPAND, 3)
        __szr_buttons.Add(self._BTN_cancel, 0, wx.LEFT|wx.EXPAND, 3)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
        __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 4)
        self.SetSizer(__szr_main)
        self.Layout()
        self.Centre()
        # end wxGlade

    def _on_save_button_pressed(self, event): # wxGlade: wxgGreetingEditorDlg.<event_handler>
        print "Event handler `_on_save_button_pressed' not implemented!"
        event.Skip()

# end of class wxgGreetingEditorDlg


if __name__ == "__main__":
    import gettext
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    dialog_1 = wxgGreetingEditorDlg(None, -1, "")
    app.SetTopWindow(dialog_1)
    dialog_1.Show()
    app.MainLoop()
