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

Source Code for Module Gnumed.wxGladeWidgets.wxg3ButtonQuestionDlg

 1  #!/usr/bin/env python 
 2  # -*- coding: iso-8859-15 -*- 
 3  # generated by wxGlade 0.6.1 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxg3ButtonQuestionDlg.wxg" 
 4   
 5  import wx 
 6   
 7  # begin wxGlade: extracode 
 8  # end wxGlade 
 9   
10   
11   
12 -class wxg3ButtonQuestionDlg(wx.Dialog):
13 - def __init__(self, *args, **kwds):
14 # begin wxGlade: wxg3ButtonQuestionDlg.__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._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._BTN_1.SetDefault()
33 # end wxGlade 34
35 - def __do_layout(self):
36 # begin wxGlade: wxg3ButtonQuestionDlg.__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 __szr_buttons.Add(self._BTN_1, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 41 __szr_buttons.Add(self._BTN_2, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 42 __szr_buttons.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 43 __szr_buttons.Add(self._BTN_3, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 44 __szr_main.Add(__szr_buttons, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5) 45 self.SetSizer(__szr_main) 46 __szr_main.Fit(self) 47 self.Layout() 48 self.Centre()
49 # end wxGlade 50
51 - def _on_BTN_1_pressed(self, event): # wxGlade: wxg3ButtonQuestionDlg.<event_handler>
52 print "Event handler `_on_BTN_1_pressed' not implemented!" 53 event.Skip()
54
55 - def _on_BTN_2_pressed(self, event): # wxGlade: wxg3ButtonQuestionDlg.<event_handler>
56 print "Event handler `_on_BTN_2_pressed' not implemented!" 57 event.Skip() 58 59 # end of class wxg3ButtonQuestionDlg 60 61 62 if __name__ == "__main__": 63 import gettext 64 gettext.install("app") # replace with the appropriate catalog name 65 66 app = wx.PySimpleApp(0) 67 wx.InitAllImageHandlers() 68 dialog_1 = wxg3ButtonQuestionDlg(None, -1, "") 69 app.SetTopWindow(dialog_1) 70 dialog_1.Show() 71 app.MainLoop() 72