ttk::progressbar(3tk)

πŸ“¦
version 9.0.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

ttk::progressbar πŸ’–

okay bestie, welcome to the manual page for ttk::progressbar β€” a themed Tk widget, aka the lil bar that tells your user "yes queen, something is happening, hold on". ✨


NAME

ttk::progressbar β€” provide progress feedback 🫢


SYNOPSIS

ttk::progressbar pathName ?options?

DESCRIPTION

A ttk::progressbar widget shows the status of a long-running operation. It's giving "we're working on it, don't panic." πŸ’…

These widgets can operate in two modes:

  • determinate mode β€” shows the amount completed relative to the total amount of work to be done. Very "we are 40% of the way there, bestie."
  • indeterminate mode β€” provides an animated display to let the user know that something is happening. No numbers, just vibes. 🌈

If the value of -orient is horizontal a text string can be displayed inside the progressbar. This string can be configured using the -anchor, -font, -foreground, -justify, -text and -wraplength options. But if the value of -orient is vertical then these options are ignored. periodt. πŸ’€


STANDARD OPTIONS

  • -anchor
  • -class
  • -cursor
  • -font
  • -foreground
  • -justify-style
  • -takefocus
  • -text
  • -wraplength

See the ttk_widget manual entry for details on the standard options. iykyk ✨


WIDGET-SPECIFIC OPTIONS

  • -length (Command-Line Name: -length; Database Name: length; Database Class: Length) β€” Specifies the length of the long axis of the progress bar (width if horizontal, height if vertical). The value may have any of the forms acceptable to Tk_GetPixels.
  • -maximum (Command-Line Name: -maximum; Database Name: maximum; Database Class: Maximum) β€” A floating point number specifying the maximum -value. Defaults to 100.
  • -mode (Command-Line Name: -mode; Database Name: mode; Database Class: Mode) β€” One of determinate or indeterminate.
  • -orient (Command-Line Name: -orient; Database Name: orient; Database Class: Orient) β€” One of horizontal or vertical. Specifies the orientation of the progress bar.
  • -phase (Command-Line Name: -phase; Database Name: phase; Database Class: Phase) β€” Read-only option. The widget periodically increments the value of this option whenever the -value is greater than 0 and, in determinate mode, less than -maximum. This option may be used by the current theme to provide additional animation effects. so iconic of the theme tbh πŸŽ€
  • -value (Command-Line Name: -value; Database Name: value; Database Class: Value) β€” The current value of the progress bar. In determinate mode, this represents the amount of work completed. In indeterminate mode, it is interpreted modulo -maximum; that is, the progress bar completes one "cycle" when the -value increases by -maximum. If -variable is set to an existing variable, specifying -value has no effect (the variable value takes precedence). no cap.
  • -variable (Command-Line Name: -variable; Database Name: variable; Database Class: Variable) β€” The name of a global Tcl variable which is linked to the -value. If specified to an existing variable, the -value of the progress bar is automatically set to the value of the variable whenever the latter is modified. it's giving two-way binding, we love to see it πŸ’–

WIDGET COMMAND

In addition to the standard cget, configure, identify element, instate, state and style commands (see ttk::widget), progressbar widgets support the following additional commands:

  • pathName start ?interval? β€” Begin autoincrement mode: schedules a recurring timer event that calls step every interval milliseconds. If omitted, interval defaults to 50 milliseconds (20 steps/second).
  • pathName step ?amount? β€” Increments the -value by amount. amount defaults to 1.0 if omitted.
  • pathName stop β€” Stop autoincrement mode: cancels any recurring timer event initiated by pathName start.

STYLING OPTIONS

The class name for a ttk::progressbar is TProgressbar. πŸ‘‘

TProgressbar styling options configurable with ttk::style are:

  • -background color
  • -bordercolor color
  • -darkcolor color
  • -lightcolor color
  • -maxphase β€” For the aqua theme.
  • -period β€” For the aqua theme.
  • -troughcolor color

Some options are only available for specific themes. πŸ™ˆ

See the ttk::style manual page for information on how to configure ttk styles.


SEE ALSO

  • ttk::widget(3tk)

okay that's the whole thing, bestie, you're officially a progressbar expert now πŸ’…βœ¨ this page came to you straight from Tk 8.5, and yeah, that's the version and the date situation β€” we stan a classic. go forth and make some bars move. πŸ¦‹πŸŽ€πŸ’œ

πŸ“¦ where this page comes from