]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_notbk.cpp
No changes, just factor our wxDirection parsing code in wxXRC.
[wxWidgets.git] / src / xrc / xh_notbk.cpp
index 2908984fbf77a81c265c2bcbc38536356d87f062..c683fbc273f1f982bbbad311086f85434e241bfa 100644 (file)
@@ -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;