iwidgets::feedback(1)
π NAME π
iwidgets::feedback β bestie, this one creates and manipulates a feedback widget, and its whole job is showing your user how far along an ongoing operation is. Progress bar energy. Iconic. β¨
π SYNOPSIS π
iwidgets::feedback pathName ?options?
π¦ INHERITANCE π¦
The family tree, and yes it's giving royalty:
itk::Widget <- iwidgets::Labeledwidget <- iwidgets::Feedback
β STANDARD OPTIONS β
These are the freebies you get from the standard crowd:
background cursor foreground highlightColor
highlightThickness
See the options manual entry for details on the standard options. Slay.
πΈ INHERITED OPTIONS πΈ
These cuties get handed down from the ancestors:
labelBitmap labelFont labelImage labelMargin
labelPos labelText labelVariable sticky
See the labeledwidget class manual entry for details on the inherited options.
π WIDGET-SPECIFIC OPTIONS π
These are the ones this widget brings to the function. Main character behavior only.
barcolor
- Name:
barcolor - Class:
BarColor - Command-Line Switch:
-barcolor
Specifies the color of the status bar, in any of the forms acceptable to Tk_GetColor. The default is DodgerBlue. π
barheight
- Name:
barheight - Class:
BarHeight - Command-Line Switch:
-barheight
Specifies the height of the status bar, in any of the forms acceptable to Tk_GetPixels. The default is 20.
troughColor
- Name:
troughColor - Class:
TroughColor - Command-Line Switch:
-troughcolor
Specifies the color of the frame in which the status bar sits, in any of the forms acceptable to Tk_GetColor. The default is white.
steps
- Name:
steps - Class:
Steps - Command-Line Switch:
-steps
Specifies the total number of steps for the status bar. The default is 10.
β¨ DESCRIPTION β¨
The iwidgets::feedback command creates a widget to display feedback on the current status of an ongoing operation to the user. And the way it does that? Display is given as a percentage and as a thermometer type bar. Double the slay. Options exist for adding a label and controlling its position, so you can make it look exactly how you want. π
π₯ METHODS π₯
The iwidgets::feedback command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for scrolledtext widgets:
π WIDGET-SPECIFIC METHODS π
pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the scrolledhtml command.
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::feedback command.
pathName reset
Reset the current number of steps completed to 0, and configures the percentage complete label text to 0%. Clean slate, fresh start, we love a reset arc. π§
pathName step ?inc?
Increase the current number of steps completed by the amount specified by inc. Inc defaults to 1. Baby steps, literally.
π EXAMPLE π
Here's the whole vibe in action:
package require Iwidgets 4.0
iwidgets::feedback .fb -labeltext "Status" -steps 20
pack .fb -padx 10 -pady 10 -fill both -expand yes
for {set i 0} {$i < 20} {incr i} {
.fb step
after 500
}
π«Ά ACKNOWLEDGEMENTS π«Ά
Sam Shen
This code is based largely on his feedback.tcl code from tk inspect. The original feedback code is copyright 1995 Lawrence Berkeley Laboratory.
π AUTHOR π
Kris Raney
π KEYWORDS π
feedback, widget
Not me getting emotional over a progress bar. Anyway β this page came to you courtesy of Tk and the iwidgets::feedback(1) manual page, no cap. Go forth and show your users some feedback, bestie. πβ¨π
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1996 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms