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

Source Code for Module Gnumed.wxGladeWidgets.wxg2ButtonQuestionDlg

 1  # -*- coding: UTF-8 -*- 
 2  # 
 3  # generated by wxGlade 
 4  # 
 5   
 6  import wx 
 7   
 8  # begin wxGlade: dependencies 
 9  import gettext 
10  # end wxGlade 
11   
12  # begin wxGlade: extracode 
13  # end wxGlade 
14   
15   
16 -class wxg2ButtonQuestionDlg(wx.Dialog):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxg2ButtonQuestionDlg.__init__ 19 kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER | wx.STAY_ON_TOP 20 wx.Dialog.__init__(self, *args, **kwds) 21 self._LBL_question = wx.StaticText(self, wx.ID_ANY, _("Put question here.")) 22 self._CHBOX_dont_ask_again = wx.CheckBox(self, wx.ID_ANY, _("Remember and don't ask again.")) 23 self._BTN_1 = wx.Button(self, wx.ID_YES, _("Yes")) 24 self._BTN_2 = wx.Button(self, wx.ID_NO, _("No")) 25 26 self.__set_properties() 27 self.__do_layout() 28 29 self.Bind(wx.EVT_BUTTON, self._on_BTN_1_pressed, id=wx.ID_YES) 30 self.Bind(wx.EVT_BUTTON, self._on_BTN_2_pressed, id=wx.ID_NO)
31 # end wxGlade 32
33 - def __set_properties(self):
34 # begin wxGlade: wxg2ButtonQuestionDlg.__set_properties 35 self.SetTitle(_("Put caption here.")) 36 self._CHBOX_dont_ask_again.SetToolTip(_("Check this if you want GNUmed to remember your decision and not ask you again."))
37 # end wxGlade 38
39 - def __do_layout(self):
40 # begin wxGlade: wxg2ButtonQuestionDlg.__do_layout 41 __szr_main = wx.BoxSizer(wx.VERTICAL) 42 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 43 __szr_main.Add(self._LBL_question, 1, wx.ALL | wx.EXPAND, 10) 44 top_bottom_separator = wx.StaticLine(self, wx.ID_ANY) 45 __szr_main.Add(top_bottom_separator, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 5) 46 __szr_main.Add(self._CHBOX_dont_ask_again, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.TOP, 10) 47 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 48 __szr_buttons.Add(self._BTN_1, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3) 49 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 50 __szr_buttons.Add(self._BTN_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 51 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 52 __szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 10) 53 self.SetSizer(__szr_main) 54 __szr_main.Fit(self) 55 self.Layout() 56 self.Centre()
57 # end wxGlade 58
59 - def _on_BTN_1_pressed(self, event): # wxGlade: wxg2ButtonQuestionDlg.<event_handler>
60 print("Event handler '_on_BTN_1_pressed' not implemented!") 61 event.Skip()
62
63 - def _on_BTN_2_pressed(self, event): # wxGlade: wxg2ButtonQuestionDlg.<event_handler>
64 print("Event handler '_on_BTN_2_pressed' not implemented!") 65 event.Skip() 66 67 # end of class wxg2ButtonQuestionDlg 68