Hello,
Im using EVT_NOTEBOOK_PAGE_CHANGED. I have a wx.Notebook, self.NBook,
with 2 tabs and Id like to call a dialog when a tab’s change occur. So I use the following lines:
self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.changeTab,self.NBook)
…
…
And inside changeTab( ), I use
if ( self.NBook.GetSelection( ) == 0 ): # to control when it is in the first Tab.
dlg = wx.MessageDialog(self, info_text, " INFO Note",
wx.YES_NO| wx.ICON_INFORMATION|wx.ICON_QUESTION)
if(dlg.ShowModal() == wx.ID_YES):
dlg.ShowModal()
dlg.Destroy()
# and some code in here
And my problem is that, i dont know why, I get the dialog window twice ! ! ! It seems its calling the event
before the change was completely done. Any Idea?
Thanks in advance!
Leticia.