scroll_to_item


Description:

public bool scroll_to_item (Item item, bool expand_parents = true, bool use_align = false, float row_align = 0)

Scrolls the source list tree to make item visible.

Granite.Widgets.SourceList.ExpandableItem.expand_with_parents is called for the item's parent if expand_parents is true, to make sure it's not hidden behind a collapsed row.

If use_align is false, then the row_align argument is ignored, and the tree does the minimum amount of work to scroll the item onto the screen. This means that the item will be scrolled to the edge closest to its current position. If the item is currently visible on the screen, nothing is done.

Parameters:

item

Item to scroll to.

expand_parents

Whether to recursively expand item's parent in case they are collapsed.

use_align

Whether to use the row_align argument.

row_align

The vertical alignment of item. 0.0 means top, 0.5 center, and 1.0 bottom.

Returns:

true if successful; false otherwise.

Since:

0.2