From bd448041e742f66b43c74bfddd2dfbda8680394a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Mar 2011 11:10:46 +0000 Subject: [PATCH] Always use icons with wxToolbook in the notebook sample. wxToolbook asserts and doesn't work if it has no images so always use them with it in the sample to avoid it. Closes #11656. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/notebook/notebook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index b56dbaeb9f..7e1a3e025b 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -548,7 +548,8 @@ void MyFrame::RecreateBook() m_bookCtrl->Hide(); - if ( m_chkShowImages ) + // wxToolbook doesn't work without icons so always use them for it. + if ( m_chkShowImages || m_type == Type_Toolbook ) { m_bookCtrl->SetImageList(m_imageList); }