beetlebug▾
/

ttk::treeview bbox

Gives the box of the row of an item, or of one cell.

PATHNAME bbox ITEM ?COLUMN?

Description

The box is a list of 4 integers: the x and y in the widget, the width, and the height. With COLUMN, the box is the cell of that column. An item that does not show, such as a row out of the view or the child of a closed item, gives an empty string.

Returns

A list of 4 integers, or an empty string.

Examples

% ttk::treeview .ttvbb -columns {size} -height 5
> for {set i 0} {$i < 30} {incr i} {.ttvbb insert {} end -id r$i}
> pack .ttvbb
> update
> list [llength [.ttvbb bbox r0]] [llength [.ttvbb bbox r0 size]] [.ttvbb bbox r29]
4 4 {}

Errors

% ttk::treeview .ttvbb2; .ttvbb2 bbox nosuch
Item nosuch not found
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also