Add wxToolbook::EnablePage()

Add functions to enable or disable pages inside wxToolbook.

Using the new functions you can present disabled icons so that the user
can expect more functionality and you do not need to add/remove pages in
different states.

Closes https://github.com/wxWidgets/wxWidgets/pull/1038
This commit is contained in:
Stefan Ziegler
2018-12-03 14:02:11 +01:00
committed by Vadim Zeitlin
parent 58f3dcf780
commit 974b7c0990
4 changed files with 71 additions and 2 deletions

View File

@@ -92,6 +92,10 @@ public:
// get the underlying toolbar
wxToolBarBase* GetToolBar() const { return (wxToolBarBase*)m_bookctrl; }
// enable/disable a page
bool EnablePage(wxWindow *page, bool enable);
bool EnablePage(size_t page, bool enable);
// must be called in OnIdle or by application to realize the toolbar and
// select the initial page.
void Realize();