I am trying to get a dialog box working using wxpython under Centos 6.
Here is my initialzation code which give the error: object has no attribute ‘OnPressEnter’
I am new at this so be kind
Ideas as to what I am doing wrong?
Thanx alot!
def initialize(self):
sizer = wx.GridBagSizer()
self.entry = wx.TextCtrl(self,-1,value=u"Enter File Name")
sizer.Add(self.entry,(0,0),(1,1),wx.EXPAND)
···
###########################
next lines cause error
AttributeError: object has no attribute ‘OnPressEnter’
self.Bind(wx.EVT_TEXT_ENTER,self.OnPressEnter,self.entry)
button = wx.Button(self,-1,label="Click me!")
sizer.Add(button, (0,1))
###########################
next line cause errors
self.Bind(wx.EVT_BUTTON, self.OnButtonClick, button)
self.label = wx.StaticText(self,-1,label=u'Hello !')
self.label.SetBackgroundColour(wx.BLACK)
self.label.SetForegroundColour(wx.RED)
sizer.Add(self.label,(1,0),(1,2),wx.EXPAND )
self.Refresh()
sizer.AddGrowableCol(0)
self.SetSizerAndFit(sizer)
self.SetSizeHints(-1,self.GetSize().y,-1,self.GetSize().y );
self.Show(True)