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

# Source Code for Module Gnumed.wxGladeWidgets.wxgFormTemplateEditAreaDlg

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  # generated by wxGlade 0.5 on Mon Aug 20 16:52:36 2007 from /home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgFormTemplateEditAreaDlg.wxg
     4
     5  import wx
     6
     7 -class wxgFormTemplateEditAreaDlg(wx.Dialog):
     8 -    def __init__(self, *args, **kwds):
     9
    10          from Gnumed.wxpython import gmFormWidgets
    11
    12          # begin wxGlade: wxgFormTemplateEditAreaDlg.__init__
    13          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME|wx.STAY_ON_TOP
    14          wx.Dialog.__init__(self, *args, **kwds)
    15          self._PNL_edit_area = gmFormWidgets.cFormTemplateEditAreaPnl(self, -1)
    16          self._BTN_save = wx.Button(self, wx.ID_OK, _("Save"))
    17          self._BTN_close = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
    18
    19          self.__set_properties()
    20          self.__do_layout()
    21
    22          self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, id=wx.ID_OK)
    23          # end wxGlade
    24
    25 -    def __set_properties(self):
    26          # begin wxGlade: wxgFormTemplateEditAreaDlg.__set_properties
    27          self.SetTitle(_("edit form template details"))
    28          self.SetSize(wx.DLG_SZE(self, (450, 200)))
    29          self._BTN_save.SetToolTipString(_("Save the encounter details."))
    30          self._BTN_close.SetToolTipString(_("Close this dialog."))
    31          self._BTN_close.SetDefault()
    32          # end wxGlade
    33
    34 -    def __do_layout(self):
    35          # begin wxGlade: wxgFormTemplateEditAreaDlg.__do_layout
    36          __szr_main = wx.BoxSizer(wx.VERTICAL)
    37          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    38          __szr_main.Add(self._PNL_edit_area, 1, wx.ALL|wx.EXPAND, 3)
    39          __szr_buttons.Add(self._BTN_save, 0, wx.EXPAND, 0)
    40          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    41          __szr_buttons.Add(self._BTN_close, 0, wx.EXPAND, 0)
    42          __szr_main.Add(__szr_buttons, 0, wx.TOP|wx.EXPAND, 15)
    43          self.SetSizer(__szr_main)
    44          self.Layout()
    45          self.Centre()
    46          # end wxGlade
    47
    48 -    def _on_save_button_pressed(self, event): # wxGlade: wxgFormTemplateEditAreaDlg.<event_handler>
    49          print "Event handler `_on_save_button_pressed' not implemented!"
    50          event.Skip()
    51
    52  # end of class wxgFormTemplateEditAreaDlg
    53
    54
    55  if __name__ == "__main__":
    56      import gettext
    57      gettext.install("app") # replace with the appropriate catalog name
    58
    59      app = wx.PySimpleApp(0)
    60      wx.InitAllImageHandlers()
    61      dialog_1 = wxgFormTemplateEditAreaDlg(None, -1, "")
    62      app.SetTopWindow(dialog_1)
    63      dialog_1.Show()
    64      app.MainLoop()
    65