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

Source Code for Module Gnumed.wxGladeWidgets.wxg3ButtonQuestionDlg

 1  #!/usr/bin/env python 
 2  # -*- coding: utf8 -*- 
 3  # generated by wxGlade 0.6.5 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxg3ButtonQuestionDlg.wxg" 
 4   
 5  import wx 
 6   
 7  # begin wxGlade: extracode 
 8  # end wxGlade 
 9   
10   
11 -class wxg3ButtonQuestionDlg(wx.Dialog):
12 - def __init__(self, *args, **kwds):
13 # begin wxGlade: wxg3ButtonQuestionDlg.__init__ 14 kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME | wx.STAY_ON_TOP 15 wx.Dialog.__init__(self, *args, **kwds) 16 self._LBL_question = wx.StaticText(self, -1, _("Put question here.")) 17 self._CHBOX_dont_ask_again = wx.CheckBox(self, -1, _("Remember and don't ask again.")) 18 self._BTN_1 = wx.Button(self, wx.ID_YES, "") 19 self._BTN_2 = wx.Button(self, wx.ID_NO, "") 20 self._BTN_3 = wx.Button(self, wx.ID_CANCEL, "") 21 22 self.__set_properties() 23 self.__do_layout() 24 25 self.Bind(wx.EVT_BUTTON, self._on_BTN_1_pressed, self._BTN_1) 26 self.Bind(wx.EVT_BUTTON, self._on_BTN_2_pressed, self._BTN_2)
27 # end wxGlade 28
29 - def __set_properties(self):
30 # begin wxGlade: wxg3ButtonQuestionDlg.__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 self._BTN_1.SetDefault()
34 # end wxGlade 35
36 - def __do_layout(self):
37 # begin wxGlade: wxg3ButtonQuestionDlg.__do_layout 38 __szr_main = wx.BoxSizer(wx.VERTICAL) 39 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 40 __szr_main.Add(self._LBL_question, 1, wx.ALL | wx.EXPAND, 10) 41 top_bottom_separator = wx.StaticLine(self, -1) 42 __szr_main.Add(top_bottom_separator, 0, wx.LEFT | wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5) 43 __szr_main.Add(self._CHBOX_dont_ask_again, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 10) 44 __szr_buttons.Add(self._BTN_1, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3) 45 __szr_buttons.Add(self._BTN_2, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0) 46 __szr_buttons.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0) 47 __szr_buttons.Add(self._BTN_3, 0, 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: wxg3ButtonQuestionDlg.<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: wxg3ButtonQuestionDlg.<event_handler>
60 print "Event handler `_on_BTN_2_pressed' not implemented!" 61 event.Skip() 62 63 # end of class wxg3ButtonQuestionDlg 64 if __name__ == "__main__": 65 import gettext 66 gettext.install("app") # replace with the appropriate catalog name 67 68 app = wx.PySimpleApp(0) 69 wx.InitAllImageHandlers() 70 dialog_1 = wxg3ButtonQuestionDlg(None, -1, "") 71 app.SetTopWindow(dialog_1) 72 dialog_1.Show() 73 app.MainLoop() 74