Greetings; 11/01/2008
I am stepping thru: "Getting Started Guide for Boa Constructor
Kevin Gill November 1, 2000 March 2005 updated for Boa 0.4.0
July 2007 updated for Boa 0.6.0 by Werner F. Bruhin "
And everything works great, until I select the AboutMenu item.
It does absolutely nothing, as far as Dialog2 is concerned.
If I put some other code in 'AboutMenu' , instead of Dialog2 stuff, 'AboutMenu' works fine.
So I know that part of 'OnMenuHelpAbou tMenu' is working.
Please, can someone tell me what is wrong with this code.
Thanks
...Vernon
I am stepping thru: "Getting Started Guide for Boa Constructor
Kevin Gill November 1, 2000 March 2005 updated for Boa 0.4.0
July 2007 updated for Boa 0.6.0 by Werner F. Bruhin "
And everything works great, until I select the AboutMenu item.
It does absolutely nothing, as far as Dialog2 is concerned.
If I put some other code in 'AboutMenu' , instead of Dialog2 stuff, 'AboutMenu' works fine.
So I know that part of 'OnMenuHelpAbou tMenu' is working.
Please, can someone tell me what is wrong with this code.
Thanks
...Vernon
Code:
[B]#Boa:Frame:Frame2[/B]
import wx
#import Dialog2
def create(parent):
return Frame2(parent)
[wxID_FRAME2, wxID_FRAME2STATUSBAR1, wxID_FRAME2TEXTEDITOR,
] = [wx.NewId() for _init_ctrls in range(3)]
[wxID_FRAME2MENUFILECLOSE, wxID_FRAME2MENUFILEEXIT, wxID_FRAME2MENUFILEOPEN,
wxID_FRAME2MENUFILESAVE, wxID_FRAME2MENUFILESAVEAS,
] = [wx.NewId() for _init_coll_menuFile_Items in range(5)]
[wxID_FRAME2MENUHELPABOUT] = [wx.NewId() for _init_coll_menuHelp_Items in range(1)]
# ###################################################
def OnMenuHelpAboutMenu(self, event):
# if hasattr(sys, 'debugger_control'):
# sys.debugger_control.set_traceable()
dlg = Dialog2.Dialog2(self)
try:
dlg.ShowModal()
finally:
dlg.Destroy() # event.Skip()
# ###################################################
[B]#Boa:Dialog:Dialog2[/B]
import wx
def create(parent):
return Dialog2(parent)
[wxID_DIALOG2, wxID_DIALOG2BUTTON1, wxID_DIALOG2STATICBITMAP1,
wxID_DIALOG2STATICTEXT1, wxID_DIALOG2STATICTEXT2,
] = [wx.NewId() for _init_ctrls in range(5)]
class Dialog2(wx.Dialog):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_Dialog2, name='', parent=prnt,
pos=wx.Point(604, 204), size=wx.Size(400, 398),
style=wx.DEFAULT_DIALOG_STYLE, title='About NoteBook')
self.SetClientSize(wx.Size(392, 364))
self.staticText1 = wx.StaticText(id=wxID_DIALOG2STATICTEXT1,
label='NoteBook - Simple Text Editor', name='staticText1',
parent=self, pos=wx.Point(80, 0), size=wx.Size(251, 23),
style=wx.ALIGN_CENTRE)
self.staticText1.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.NORMAL,
False, 'Tahoma'))
self.staticText2 = wx.StaticText(id=wxID_DIALOG2STATICTEXT2,
label='This is my first Boa Contstructor application',
name='staticText2', parent=self, pos=wx.Point(40, 56),
size=wx.Size(309, 19), style=0)
self.staticText2.SetBackgroundColour(wx.Colour(255, 0, 0))
self.staticText2.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.NORMAL,
False, 'Tahoma'))
self.staticBitmap1 = wx.StaticBitmap(bitmap=wx.Bitmap(u'C:/Program Files/Python26/Boa Constructor/Practice/Boa.jpg',
wx.BITMAP_TYPE_JPEG), id=wxID_DIALOG2STATICBITMAP1,
name='staticBitmap1', parent=self, pos=wx.Point(80, 112),
size=wx.Size(236, 157), style=0)
self.button1 = wx.Button(id=wxID_DIALOG2BUTTON1, label='Close',
name='button1', parent=self, pos=wx.Point(168, 312),
size=wx.Size(75, 23), style=0)
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
id=wxID_DIALOG2BUTTON1)
def __init__(self, parent):
self._init_ctrls(parent)
def OnButton1Button(self, event):
self.Close() # event.Skip()
Comment