Package: gtk

Function gtk:icon-view-scroll-to-path

Lambda List

gtk:icon-view-scroll-to-path (view path &key row-align col-align)

Arguments

view -- a gtk:icon-view widget
path -- a gtk:tree-path instance for the item to move to
row-align -- a number coerced to a single float for the vertical alignment of the item specified by path
col-align -- a number coerced to a single float for the horizontal alignment of the item specified by path

Details

Moves the alignments of view to the position specified by path. The row-align argument determines where the row is placed, and the col-align argument determines where the column is placed. Both are expected to be between 0.0 and 1.0. The 0.0 value means left/top alignment, the 1.0 value means right/bottom alignment, the 0.5 value means center. The keyword arguments have the default 0.5 value.

If both row-align and col-align arguments are nil, then the alignment arguments are 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.

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 modified to reflect this change.

Warning

The gtk:icon-view implementation is deprecated since 4.10. Use the gtk:grid-view implementation instead.
 

See also

#2025-1-11