git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31647
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = true);
// the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = true);
+ // the item will be shown with a drop highlight
+ void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true);
+
// set the item's text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
// set the item's text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
wxPendingDelete.Append(this);
m_finished = true;
wxPendingDelete.Append(this);
m_finished = true;
m_owner->SetFocusIgnoringChildren();
}
}
m_owner->SetFocusIgnoringChildren();
}
}
+void wxGenericTreeCtrl::SetItemDropHighlight(const wxTreeItemId& item,
+ bool highlight)
+{
+ wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
+ wxColour fg, bg;
+
+ if (highlight)
+ {
+ bg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
+ fg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
+ }
+
+ wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
+ pItem->Attr().SetTextColour(fg);
+ pItem->Attr().SetBackgroundColour(bg);
+ RefreshLine(pItem);
+}
+
void wxGenericTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
const wxColour& col)
{
void wxGenericTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
const wxColour& col)
{