X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/819559b2ac7d2250097ce0b1d9d443164752be09..50c202914e449f57a1d1a6d07447c6988f392005:/src/xrc/xh_notbk.cpp diff --git a/src/xrc/xh_notbk.cpp b/src/xrc/xh_notbk.cpp index 2908984fbf..c683fbc273 100644 --- a/src/xrc/xh_notbk.cpp +++ b/src/xrc/xh_notbk.cpp @@ -87,6 +87,19 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() int imgIndex = imgList->Add(bmp); m_notebook->SetPageImage(m_notebook->GetPageCount()-1, imgIndex ); } + else if ( HasParam(wxT("image")) ) + { + if ( m_notebook->GetImageList() ) + { + m_notebook->SetPageImage(m_notebook->GetPageCount()-1, + GetLong(wxT("image")) ); + } + else // image without image list? + { + ReportError(n, "image can only be used in conjunction " + "with imagelist"); + } + } } else { @@ -111,6 +124,10 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() GetStyle(wxT("style")), GetName()); + wxImageList *imagelist = GetImageList(); + if ( imagelist ) + nb->AssignImageList(imagelist); + SetupWindow(nb); wxNotebook *old_par = m_notebook;