diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 545ecd90fd..d10a4e7d42 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -222,7 +222,6 @@ public: // Only for internal use right now, but should probably be public wxTreeItemId GetNext(const wxTreeItemId& item) const; - wxTreeItemId GetPrev(const wxTreeItemId& item) const; // operations // ---------- @@ -329,6 +328,10 @@ public: // implementation only from now on + // overridden base class virtuals + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); + // callbacks void OnPaint( wxPaintEvent &event ); void OnSetFocus( wxFocusEvent &event ); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index cb51d15b54..deede8e3e2 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1032,15 +1032,6 @@ wxTreeItemId wxGenericTreeCtrl::GetNext(const wxTreeItemId& item) const } } -wxTreeItemId wxGenericTreeCtrl::GetPrev(const wxTreeItemId& item) const -{ - wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); - - wxFAIL_MSG(wxT("not implemented")); - - return wxTreeItemId(); -} - wxTreeItemId wxGenericTreeCtrl::GetFirstVisibleItem() const { wxTreeItemId id = GetRootItem(); @@ -2926,4 +2917,28 @@ void wxGenericTreeCtrl::RefreshSelectedUnder(wxGenericTreeItem *item) } } +// ---------------------------------------------------------------------------- +// changing colours: we need to refresh the tree control +// ---------------------------------------------------------------------------- + +bool wxGenericTreeCtrl::SetBackgroundColour(const wxColour& colour) +{ + if ( !wxWindow::SetBackgroundColour(colour) ) + return FALSE; + + Refresh(); + + return TRUE; +} + +}bool wxGenericTreeCtrl::SetForegroundColour(const wxColour& colour) +{ + if ( !wxWindow::SetForegroundColour(colour) ) + return FALSE; + + Refresh(); + + return TRUE; +} + #endif // wxUSE_TREECTRL