- // avoid redrawing the tree if no real change
- wxGenericTreeItem *pItem = item.m_pItem;
- if ( pItem->IsBold() != bold )
- {
- pItem->SetBold(bold);
+ // avoid redrawing the tree if no real change
+ wxGenericTreeItem *pItem = item.m_pItem;
+ if ( pItem->IsBold() != bold )
+ {
+ pItem->SetBold(bold);
+ RefreshLine(pItem);
+ }
+}
+
+void wxTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
+ const wxColour& col)
+{
+ wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
+ wxGenericTreeItem *pItem = item.m_pItem;
+ pItem->Attr().SetTextColour(col);
+ RefreshLine(pItem);
+}
+
+void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
+ const wxColour& col)
+{
+ wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
+ wxGenericTreeItem *pItem = item.m_pItem;
+ pItem->Attr().SetBackgroundColour(col);
+ RefreshLine(pItem);
+}
+
+void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
+{
+ wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
+ wxGenericTreeItem *pItem = item.m_pItem;
+ pItem->Attr().SetFont(font);