Table of Contents

Method GetScrollOffsetOf

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

GetScrollOffsetOf(T)

Returns the index of the object o if it is currently exposed (it's parent(s) have been expanded). This can be used with ScrollOffsetVertical and SetNeedsDisplay() to scroll to a specific object.

public int GetScrollOffsetOf(T o)

Parameters

o T

An object that appears in your tree and is currently exposed.

Returns

int

The index the object was found at or -1 if it is not currently revealed or not in the tree at all.

Remarks

Uses the Equals method and returns the first index at which the object is found or -1 if it is not found.