My previous post has been resolved and can be marked closed- I needed to switch the order of my procedures so that it was defined before it was called.
I can also close it once it is posted to the forum.
Now I am not getting any errors but I am unable to change the on the dialog box -see bolded lines below:
class decode_dialog_wx(wx.Frame):
def OnButtonClick(self,event):
print “You Clicked the Button”
def OnPressEnter(self,event):
print “You pressed Enter”
def init(self,parent,id,title):
wx.Frame.init(self,parent,id,title)
self.parent = parent
self.initialize()
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)
self.Bind(wx.EVT_TEXT_ENTER,self.OnPressEnter,self.entry)
button = wx.Button(self,-1,label=“Click me!”)
sizer.Add(button, (0,1))
self.Bind(wx.EVT_BUTTON, self.OnButtonClick, button)
self.label = wx.StaticText(self,-1,label=u’Hello !’)
self.label.SetBackgroundColour(wx.BLUE)
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)
if name == ‘main’:
app = wx.App()
frame = decode_dialog_wx(None,-1,‘Decoder’)
app.MainLoop()
main()
The dialog box shows the text as RED but the background is the original grey.
I am running CENTOS 6.5 with Python 2.6.6
I am sure that it is something simple but I am not getting errors to help me along
Thanks in advance!