viewport_at#

WorkspaceLayout.viewport_at(row: int, column: int) → Viewport#

Return the viewport occupying a grid cell.

A viewport that spans several cells is returned for each cell that it occupies.

Parameters:
rowint

Zero-based row index, from top to bottom.

columnint

Zero-based column index, from left to right.

Returns:
Viewport

Viewport occupying the requested cell.

Raises:
IndexError

If the cell is outside the layout.

Examples

Get the viewport in the second row of the first column.

>>> viewport = workspace.layout.viewport_at(row=1, column=0)