Attachment 'errorDiagTestF.py'

Download

   1 #Boa:Frame:Frame1
   2 
   3 import wx
   4 
   5 def create(parent):
   6     return Frame1(parent)
   7 
   8 [wxID_FRAME1, wxID_FRAME1CHANGEDE, wxID_FRAME1CHANGEEN, wxID_FRAME1FORCEERROR, 
   9  wxID_FRAME1PANEL1, 
  10 ] = [wx.NewId() for _init_ctrls in range(5)]
  11 
  12 class Frame1(wx.Frame):
  13     def _init_coll_flexGridSizer1_Items(self, parent):
  14         # generated method, don't edit
  15 
  16         parent.AddWindow(self.changeEN, 0, border=2, flag=wx.ALL | wx.EXPAND)
  17         parent.AddWindow(self.changeDE, 0, border=2, flag=wx.ALL | wx.EXPAND)
  18         parent.AddWindow(self.forceError, 0, border=2, flag=wx.ALL | wx.EXPAND)
  19 
  20     def _init_coll_flexGridSizer1_Growables(self, parent):
  21         # generated method, don't edit
  22 
  23         parent.AddGrowableCol(0)
  24         parent.AddGrowableCol(1)
  25 
  26     def _init_sizers(self):
  27         # generated method, don't edit
  28         self.flexGridSizer1 = wx.FlexGridSizer(cols=2, hgap=0, rows=0, vgap=0)
  29 
  30         self._init_coll_flexGridSizer1_Items(self.flexGridSizer1)
  31         self._init_coll_flexGridSizer1_Growables(self.flexGridSizer1)
  32 
  33         self.panel1.SetSizer(self.flexGridSizer1)
  34 
  35     def _init_ctrls(self, prnt):
  36         # generated method, don't edit
  37         wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
  38               pos=wx.Point(620, 301), size=wx.Size(409, 95),
  39               style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
  40         self.SetClientSize(wx.Size(393, 59))
  41 
  42         self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
  43               pos=wx.Point(0, 0), size=wx.Size(393, 59),
  44               style=wx.TAB_TRAVERSAL)
  45 
  46         self.changeEN = wx.Button(id=wxID_FRAME1CHANGEEN,
  47               label=_('Change language to English'), name='changeEN',
  48               parent=self.panel1, pos=wx.Point(2, 2), size=wx.Size(214, 23),
  49               style=0)
  50         self.changeEN.Bind(wx.EVT_BUTTON, self.OnChangeENButton,
  51               id=wxID_FRAME1CHANGEEN)
  52 
  53         self.changeDE = wx.Button(id=wxID_FRAME1CHANGEDE,
  54               label=_('Change language to Deutsch'), name='changeDE',
  55               parent=self.panel1, pos=wx.Point(220, 2), size=wx.Size(171, 23),
  56               style=0)
  57         self.changeDE.Bind(wx.EVT_BUTTON, self.OnChangeDEButton,
  58               id=wxID_FRAME1CHANGEDE)
  59 
  60         self.forceError = wx.Button(id=wxID_FRAME1FORCEERROR,
  61               label=_('Force an divide by zero error'), name='forceError',
  62               parent=self.panel1, pos=wx.Point(2, 29), size=wx.Size(214, 23),
  63               style=0)
  64         self.forceError.Bind(wx.EVT_BUTTON, self.OnForceErrorButton,
  65               id=wxID_FRAME1FORCEERROR)
  66 
  67         self._init_sizers()
  68 
  69     def __init__(self, parent):
  70         self._init_ctrls(parent)
  71 
  72     def OnChangeENButton(self, event):
  73         wx.GetApp().ChangeLang('en')
  74 
  75     def OnChangeDEButton(self, event):
  76         wx.GetApp().ChangeLang('de')
  77 
  78     def OnForceErrorButton(self, event):
  79         print 10/0

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-10-04 09:16:02, 0.2 KB) [[attachment:__version__.py]]
  • [get | view] (2009-10-04 09:16:02, 24.5 KB) [[attachment:dialogerror.py]]
  • [get | view] (2009-10-04 09:16:02, 6.4 KB) [[attachment:errorDiagTestApp.py]]
  • [get | view] (2009-10-04 09:16:02, 2.9 KB) [[attachment:errorDiagTestF.py]]
  • [get | view] (2009-10-04 09:16:02, 52.6 KB) [[attachment:errorDialog.zip]]
  • [get | view] (2009-10-04 09:16:02, 6.3 KB) [[attachment:simplemapi.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.