X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/819559b2ac7d2250097ce0b1d9d443164752be09..8a72770aa682c6b4ea8efa7f5d4ed5e5fa1bcfa6:/src/xrc/xh_treebk.cpp diff --git a/src/xrc/xh_treebk.cpp b/src/xrc/xh_treebk.cpp index cd199b7bb6..efc5c36f99 100644 --- a/src/xrc/xh_treebk.cpp +++ b/src/xrc/xh_treebk.cpp @@ -61,6 +61,10 @@ wxObject *wxTreebookXmlHandler::DoCreateResource() GetStyle(wxT("style")), GetName()); + wxImageList *imagelist = GetImageList(); + if ( imagelist ) + tbk->AssignImageList(imagelist); + wxTreebook * old_par = m_tbk; m_tbk = tbk; @@ -117,6 +121,18 @@ wxObject *wxTreebookXmlHandler::DoCreateResource() } imgIndex = imgList->Add(bmp); } + else if ( HasParam(wxT("image")) ) + { + if ( m_tbk->GetImageList() ) + { + imgIndex = GetLong(wxT("image")); + } + else // image without image list? + { + ReportError(n, "image can only be used in conjunction " + "with imagelist"); + } + } // then add the page to the corresponding parent if( depth < m_treeContext.GetCount() )