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:
@@ -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
|
||||
|
Reference in New Issue
Block a user