]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_bttn.cpp
Italian translation corrections from Roberto Boriotti.
[wxWidgets.git] / src / xrc / xh_bttn.cpp
index 397c6dbe472903c446312d4b3fed148e12e16896..7f2058cdd24f1646446c8bdf243e379e815f8189 100644 (file)
@@ -15,7 +15,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_XRC
+#if wxUSE_XRC && wxUSE_BUTTON
 
 #include "wx/xrc/xh_bttn.h"
 
@@ -50,6 +50,13 @@ wxObject *wxButtonXmlHandler::DoCreateResource()
 
     if (GetBool(wxT("default"), 0))
         button->SetDefault();
+
+    if ( GetParamNode("bitmap") )
+    {
+        button->SetBitmap(GetBitmap("bitmap", wxART_BUTTON),
+                          GetDirection("bitmapposition"));
+    }
+
     SetupWindow(button);
 
     return button;
@@ -60,4 +67,4 @@ bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
     return IsOfClass(node, wxT("wxButton"));
 }
 
-#endif // wxUSE_XRC
+#endif // wxUSE_XRC && wxUSE_BUTTON