Bug report FlatNotebook

I set right-click menu on FlatNotebook. As I right click on the tab,
the popup menu will display, but the page changed event won't be
triggered at, So I think it maybe a bug. And I want to know if there
is way that I can popup right-click menu myself, because I want to
dynamicly create popup menu myself, as I right click on the tab.

···

--
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

Hi limodou,

I set right-click menu on FlatNotebook. As I right click on the tab,
the popup menu will display, but the page changed event won't be
triggered at, So I think it maybe a bug.

Thanks for the report. I fixed it right now.

And I want to know if there
is way that I can popup right-click menu myself, because I want to
dynamicly create popup menu myself, as I right click on the tab.

Not till now, but I added this functionality. It works in this way:

The wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU event is sent in any case,
but FlatNotebook will react in 2 different ways depending on the fact
you have used SetRightClickMenu() or not:

1) If you use SetRightClickMenu and assign to FlatNotebook a fixed
menu (i.e., non dynamic), FlatNotebook will call PopupMenu for you.
2) If you do *not* use SetRightClickMenu, you can intercept the
wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU event in your application and do
something like:

self.Bind(wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU, self.ShowMyMenu)

def ShowMyMenu(self, event):
    # build your own dynamic menu
    self.PopupMenu(myOwnMenu)
    event.Skip()

assuming that "self" is FlatNotebook. I didn't test these options in
depth, but they seem to work. I have also added a couple of small bug
fixes taken directly from Eran and his C++ source code :smiley:
You can find the updated sources in the usual places:

http://xoomer.alice.it/infinity77/eng/freeware.html#flatnotebook

Or:

http://xoomer.alice.it/infinity77/ita/freeware.html#flatnotebook

I am also sending a patch to Robin against the latest CVS.

Please let me know if you find anything strange.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

Thank you very much. I'll try it, and if I found something strange
I'll report it to you.

···

--
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou