]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
corrected version in the libraries names: it's only 2 digits even in development...
[wxWidgets.git] / src / msw / tbar95.cpp
index 64a3802e260ea5492881730cc2b425b450ef07f0..5e4d811bf00016560be98d5686e6718b00814004 100644 (file)
@@ -1071,9 +1071,9 @@ bool wxToolBar::Realize()
     }
     else if ( m_nButtons > 0 ) // vertical non empty toolbar
     {
-        if ( m_maxRows == 0 )
-            // if not set yet, have one column
-            SetRows(m_nButtons);
+        // if not set yet, have one column
+        m_maxRows = 1;
+        SetRows(m_nButtons);        
     }
 
     InvalidateBestSize();
@@ -1331,6 +1331,30 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(tog
     wxFAIL_MSG( _T("not implemented") );
 }
 
+void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
+{
+    wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
+    if ( tool )
+    {
+        wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
+
+        tool->SetNormalBitmap(bitmap);
+        Realize();
+    }    
+}
+
+void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
+{
+    wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
+    if ( tool )
+    {
+        wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
+
+        tool->SetDisabledBitmap(bitmap);
+        Realize();
+    }    
+}
+
 // ----------------------------------------------------------------------------
 // event handlers
 // ----------------------------------------------------------------------------