beetlebug▾
/

tk insets

Gives the parts of a toplevel under the bars of the system and the soft keyboard.

tk insets ?WINDOW?

Description

Gives a dict with the keys top, left, bottom, right, and keyboard. Each value is a count of logical pixels at that side of the toplevel WINDOW, . by default, from the last change of the platform. A phone has bars of the system at the top and the bottom, and its soft keyboard covers the bottom. A desktop backend gives 0 for each.

Returns

A dict of five counts of pixels.

Examples

% tk insets
top 0 left 0 bottom 0 right 0 keyboard 0

Errors

% button .b
> tk insets .b
window ".b" isn't a top-level window
-errorcode NONE

% tk insets .nope
bad window path name ".nope"
-errorcode NONE

Facts

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