add support for loading wxListCtrl items and wxImageLists from XRC (closes #10647)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user