TreeList.RefreshScrollAnnotations(ScrollAnnotationKind, Int32[]) Method

Updates scrollbar annotations of the specified kind for the specified nodes, and causes them to be redrawn.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

public virtual void RefreshScrollAnnotations(
    ScrollAnnotationKind kind,
    int[] rows
)
Public Overridable Sub RefreshScrollAnnotations(
    kind As ScrollAnnotationKind,
    rows As Integer()
)

Parameters

Name Type Description
kind DevExpress.XtraEditors.Annotations.ScrollAnnotationKind

The kind of scrollbar annotations to update.

rows Int32[]

An array of node handles.

Remarks

The code below updates custom scrollbar annotations for all nodes.

bool ToggleBookmark(TreeListNode node) {
    int dataIndex = node != null ? node.Id : -1;
    if(dataIndex < 0)
        return false;
    if(bookmarks.Contains(dataIndex))
        bookmarks.Remove(dataIndex);
    else
        bookmarks.Add(dataIndex);
    treeList1.RefreshScrollAnnotations(ScrollAnnotationKind.Custom);
    treeList1.InvalidateNode(node);
    return true;
}
NOTE

Run the Hierarchy Column module in the XtraTreeList MainDemo to see the complete example.

See Also