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:
@@ -222,7 +222,6 @@ public:
|
|||||||
|
|
||||||
// Only for internal use right now, but should probably be public
|
// Only for internal use right now, but should probably be public
|
||||||
wxTreeItemId GetNext(const wxTreeItemId& item) const;
|
wxTreeItemId GetNext(const wxTreeItemId& item) const;
|
||||||
wxTreeItemId GetPrev(const wxTreeItemId& item) const;
|
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
// ----------
|
// ----------
|
||||||
@@ -329,6 +328,10 @@ public:
|
|||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
|
|
||||||
|
// overridden base class virtuals
|
||||||
|
virtual bool SetBackgroundColour(const wxColour& colour);
|
||||||
|
virtual bool SetForegroundColour(const wxColour& colour);
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
void OnPaint( wxPaintEvent &event );
|
void OnPaint( wxPaintEvent &event );
|
||||||
void OnSetFocus( wxFocusEvent &event );
|
void OnSetFocus( wxFocusEvent &event );
|
||||||
|
@@ -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 wxGenericTreeCtrl::GetFirstVisibleItem() const
|
||||||
{
|
{
|
||||||
wxTreeItemId id = GetRootItem();
|
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
|
#endif // wxUSE_TREECTRL
|
||||||
|
Reference in New Issue
Block a user