I have a NoteBook in wxpython as follows:
self.a = wx.Notebook(self, -1, style=0)
self.x= firstpanel(self.a,None)
self.y= secondpanel(self.a,None)
self.a.AddPage(self.x,_("firstPage"))
self.a.AddPage(self.y,_("secondPage"))
self.a.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED,self.ChangedTab)
In ChangedTab I want to change a Button named bttn in the screen. if secondPage tab was clicked then button will be clickable (bttn.Enabled() ) if any other tab was clicked button will be unclickable (bttn.Disable()).
What I have so far is:
def ChangedTab(self, event):
index = event.GetIndex()
My problem is how do I know which tab was clicked?
I know the tabs by their names firstPage and secondPage etc.. how do I get them from the event? The GetIndex() doesn't seem to help me in this case. or there is another way to do what?