With wx.aui.AuiNotebook or wx.lib.agw.aui.AuiNotebook, it is possible
to control on which notebook tabs the close button is shown?
I want some of the pages not closable, while others closable by the
user.
Currently I use AUI_NB_CLOSE_ON_ALL_TABS to show the close button on
all the tabs, and then veto the close events for the non-closable
tabs.
It would be nice to hide the close button on the non-closable tabs.
Does anybody know whether it is possible to do so?
I have added this feature in AUI in SVN. It can be used only when you
specify AUI_NB_CLOSE_ON_ALL_TABS: you simply call:
notebook.SetCloseButton(page_index, False)
And the selected page will not be closable and it will not display a
close button. The AUI demo reflects this change: simply choose the
menu "Notebook" => "Set Close Button On All Tabs" and you will see
that page 2 (zero-indexed) has no close button.