added support disabled tag for toolbar elements in XRC
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Feb 2006 13:20:18 +0000 (13:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Feb 2006 13:20:18 +0000 (13:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/tech/tn0014.txt
src/xrc/xh_toolb.cpp

index 039b78978434723c0fb4f44ed9398c80ec7df58e..eb0f8f27a1ada7b8de1c69124c64e328f6106094 100644 (file)
@@ -76,6 +76,7 @@ All (GUI):
 - Added SetSheetStyle to wxPropertySheetDialog and allowed it to
   behave like a Mac OS X settings dialog.
 - wxDC::BeginDrawing() and wxDC::EndDrawing() deprecated.
+- Added <disabled> XRC tag for wxToolBar elements
 
 wxMSW:
 
index ad482a4f9ed5044eef9885a52299baacaceaca22..6260226d17c288a1d169efb1a4795cccbe17b47a 100644 (file)
@@ -457,6 +457,7 @@ appear within wxToolBar node. Their attributes are as follows:
     bitmap2                Bitmap                  wxNullBitmap
     toggle                 Boolean                 0
     radio                  Boolean                 0
+    disabled               Boolean                 0
     label                  I18nString              ""
     tooltip                I18nString              ""
     longhelp               I18nString              ""
index 785d4d9deed53db10956955c87eaa5a31cc8731e..ba53f016f08b610c78608ed78edd86b92fdb1ed7 100644 (file)
@@ -76,6 +76,9 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
                                kind,
                                GetText(wxT("tooltip")),
                                GetText(wxT("longhelp")));
+
+            if ( GetBool(wxT("disabled")) )
+                m_toolbar->EnableTool(GetID(), false);
         }
         return m_toolbar; // must return non-NULL
     }