diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index 6569aadc34..d874514ba9 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -459,9 +459,11 @@ public: return m_pPropGrid->GetSelection(); } +#if wxUSE_TOOLBAR /** Returns a pointer to the toolbar currently associated with the wxPropertyGridManager (if any). */ wxToolBar* GetToolBar() const { return m_pToolbar; } +#endif // wxUSE_TOOLBAR /** Creates new property page. Note that the first page is not created automatically. diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 942d0dda9e..482104a8c3 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1409,6 +1409,7 @@ void wxPropertyGridManager::OnPaint( wxPaintEvent& WXUNUSED(event) ) if ( HasExtraStyle(wxPG_EX_TOOLBAR_SEPARATOR) ) { +#if wxUSE_TOOLBAR if (m_pToolbar && m_pPropGrid) { wxPen marginPen(m_pPropGrid->GetMarginColour()); @@ -1417,6 +1418,7 @@ void wxPropertyGridManager::OnPaint( wxPaintEvent& WXUNUSED(event) ) int y = m_pPropGrid->GetPosition().y-1; dc.DrawLine(0, y, GetClientSize().x, y); } +#endif // wxUSE_TOOLBAR } // Repaint splitter and any other description box decorations