refresh the tree ctrl when its back/foreground colour changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-08-25 12:06:53 +00:00
parent de7f086027
commit 7009f411aa
2 changed files with 28 additions and 10 deletions

View File

@@ -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