Method GTK2.TreeView()->scroll_to_cell()


Method scroll_to_cell

GTK2.TreeView scroll_to_cell(GTK2.TreePath path, GTK2.TreeViewColumn column, float|void row_align, float|void col_align)

Description

Moves the alignments of the view to the position specified by column and path. If column is 0, then no horizontal scrolling occurs. Likewise, if path is 0, no vertical scrolling occurs. At a minimum, one of column or path needs to be non-zero. row_align determines where the row is placed, and col_align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.

If row_align exists, then col_align must exist, otherwise neither will be used. If neither are used, the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.

This function only works if the model is set, and path is a valid row on the model. If the model changes before the view is realized, the centered path will be modifed to reflect this change.