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

# Source Code for Module Gnumed.wxGladeWidgets.wxg2ButtonQuestionDlg

     1  #!/usr/bin/env python
     2  # -*- coding: iso-8859-15 -*-
     3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxg2ButtonQuestionDlg.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11
    12 -class wxg2ButtonQuestionDlg(wx.Dialog):
    13 -    def __init__(self, *args, **kwds):
    14          # begin wxGlade: wxg2ButtonQuestionDlg.__init__
    15          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME|wx.STAY_ON_TOP
    16          wx.Dialog.__init__(self, *args, **kwds)
    17          self._LBL_question = wx.StaticText(self, -1, _("Put question here."))
    18          self._CHBOX_dont_ask_again = wx.CheckBox(self, -1, _("Remember and don't ask again."))
    19          self._BTN_1 = wx.Button(self, wx.ID_YES, _("Yes"))
    20          self._BTN_2 = wx.Button(self, wx.ID_NO, _("No"))
    21
    22          self.__set_properties()
    23          self.__do_layout()
    24
    25          self.Bind(wx.EVT_BUTTON, self._on_BTN_1_pressed, id=wx.ID_YES)
    26          self.Bind(wx.EVT_BUTTON, self._on_BTN_2_pressed, id=wx.ID_NO)
    27          # end wxGlade
    28
    29 -    def __set_properties(self):
    30          # begin wxGlade: wxg2ButtonQuestionDlg.__set_properties
    31          self.SetTitle(_("Put caption here."))
    32          self._CHBOX_dont_ask_again.SetToolTipString(_("Check this if you want GNUmed to remember your decision and not ask you again."))
    33          # end wxGlade
    34
    35 -    def __do_layout(self):
    36          # begin wxGlade: wxg2ButtonQuestionDlg.__do_layout
    37          __szr_main = wx.BoxSizer(wx.VERTICAL)
    38          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    39          __szr_main.Add(self._LBL_question, 1, wx.ALL|wx.EXPAND, 10)
    40          top_bottom_separator = wx.StaticLine(self, -1)
    41          __szr_main.Add(top_bottom_separator, 0, wx.LEFT|wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    42          __szr_main.Add(self._CHBOX_dont_ask_again, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.ALIGN_CENTER_VERTICAL, 10)
    43          __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    44          __szr_buttons.Add(self._BTN_1, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3)
    45          __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    46          __szr_buttons.Add(self._BTN_2, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    47          __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    48          __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 10)
    49          self.SetSizer(__szr_main)
    50          __szr_main.Fit(self)
    51          self.Layout()
    52          self.Centre()
    53          # end wxGlade
    54
    55 -    def _on_BTN_1_pressed(self, event): # wxGlade: wxg2ButtonQuestionDlg.<event_handler>
    56          print "Event handler `_on_BTN_1_pressed' not implemented!"
    57          event.Skip()
    58
    59 -    def _on_BTN_2_pressed(self, event): # wxGlade: wxg2ButtonQuestionDlg.<event_handler>
    60          print "Event handler `_on_BTN_2_pressed' not implemented!"
    61          event.Skip()
    62
    63  # end of class wxg2ButtonQuestionDlg
    64
    65
    66  if __name__ == "__main__":
    67      import gettext
    68      gettext.install("app") # replace with the appropriate catalog name
    69
    70      app = wx.PySimpleApp(0)
    71      wx.InitAllImageHandlers()
    72      dialog_1 = wxg2ButtonQuestionDlg(None, -1, "")
    73      app.SetTopWindow(dialog_1)
    74      dialog_1.Show()
    75      app.MainLoop()
    76