Meter#
Meter is a radial progress/dial widget that ttkbootstrap ships
(ttk.Meter). It shows a value as an arc — a full circle or a semicircle —
with a formatted center label, optional side and sub labels, and an optional
interactive mode that lets the user drag the value like a dial. This page is the complete lookup reference.
Every option below can be set in the constructor and changed at runtime with
configure() (and read back with cget()).
Options#
Each option can be passed to the constructor and changed later with
configure().
Option |
Type |
Description |
|---|---|---|
|
|
The color of the indicator and center text — one of |
|
|
The current value, shown in the center label when |
|
|
The minimum of the range; may be negative. Default |
|
|
The maximum of the range. Default |
|
|
The format string for the center value. Fractional formats such as
|
|
|
How much |
|
|
|
|
|
The arc’s sweep in degrees. Left unset, it follows |
|
|
The offset of the arc’s starting position in degrees; |
|
|
The logical side length of the (square) meter in screen units, scaled for
high-DPI. Default |
|
|
The thickness of the indicator band. Default |
|
|
If greater than |
|
|
If greater than |
|
|
Whether to show the left, center, and right text labels. Default
|
|
|
A short string placed to the left of the center value (commonly |
|
|
A short string placed to the right of the center value (commonly
|
|
|
The font for the center value. Default |
|
|
Supplemental text shown below the center value. |
|
|
The |
|
|
The font for the subtext. Default |
|
|
Whether the user can adjust the value by clicking and dragging the meter.
Default |
The meter is a Frame subclass, so it also accepts the frame’s own options —
padding, borderwidth, relief, width, height, cursor,
takefocus — applied to the surrounding container.
Methods#
- step(delta=1)
Increment (or decrement) the value by
deltasteps. The indicator bounces back at the minimum and maximum, reversing direction automatically.- Parameters:
delta – the number of steps; positive increases, negative decreases.
- Returns:
None.
- value
The current meter value (read-only property; equivalent to
cget("amount_used")). To set it, useconfigure(amount_used=...)or the bound variableamount_used_var— aVariableyou can share with other widgets to keep them in sync with the meter.
See also#
Meter catalog page — usage, screenshots, and examples.