Hi, there,
I know X button on FlatNoteBook’s tab can delete the specified page and the associated window. But I want X button to remove tab, not delete tab because I want to keep my originally defined panel in it. I have tried event.Veto() to disable EVT_FLATNOTEBOOK_PAGE_CLOSING and used RemovePage instead, but X button does not close tab anymore. Do you guys have other way to do it? Your clue is appreciate.
Here is my part of coding.
…
self.NoteBook.Bind(fnb.EVT_FLATNOTEBOOK_PAGE_CLOSING, self.OnCloseTab);
…
def OnCloseTab(self, event):
try:
PageIndex = event.GetEventObject().GetSelection();
self.NoteBook.RemovePage(PageIdex);
except NameError:
pass
event.Veto();
Thanks a lot!
Eddy H.