]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_listb.cpp
set SMALL_FONT for controls here because InheritAttributes() doesn't do it any longer
[wxWidgets.git] / contrib / src / xrc / xh_listb.cpp
index f77a5b5d812b5fbd781423694a2d28e57f232dec..68caf3c1b8df06862ec0050240728625cfe8bab8 100644 (file)
@@ -21,6 +21,9 @@
 
 #include "wx/xrc/xh_listb.h"
 #include "wx/listbox.h"
+#include "wx/intl.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxListBoxXmlHandler, wxXmlResourceHandler)
 
 wxListBoxXmlHandler::wxListBoxXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
@@ -82,7 +85,10 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
         // handle <item>Label</item>
         
         // add to the list
-        strList.Add(GetNodeContent(m_node));
+        wxString str = GetNodeContent(m_node);
+        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+            str = wxGetTranslation(str);
+        strList.Add(str);
 
         return NULL;
     }