]> git.saurik.com Git - wxWidgets.git/commitdiff
Always use icons with wxToolbook in the notebook sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Mar 2011 11:10:46 +0000 (11:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Mar 2011 11:10:46 +0000 (11:10 +0000)
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

index b56dbaeb9f50f83834a9530c0d67ad58cf5deddd..7e1a3e025ba554425b004ccbfdd3518f5711bcb0 100644 (file)
@@ -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);
     }