A widget which gives the user feedback of
background task. Synopsis
gnocl::progressBar [-option value...]
Screenshot
Options
- -activityMode boolean (default: 0)
-
Whether the progressbar shows only, that an activity is going on.
-
-fraction float (0 lt fraction lt 1)
-
Only if activityMode is false: fraction of the work done.
-
-pulseStep
-
type: float (0 lt pulseStep lt 1)
-
How much the block in activityMode moves in one step.
-
-orientation one of leftToRight, rightToLeft, bottomToTop or topToBottom
(default: leftToRight)
-
Direction of the progressbar.
-
-text string (default: "")
-
Only if activityMode is false: text to be shown, mostly the fraction
of the work done.
-
-textAlign one of
topLeft, top, topRight, left, center, right, bottomLeft, bottom, or
bottomRight (default: center)
-
Alignment of the text.
-
-showText boolean (default: 1)
-
Whether to show the text.
-
-name string
-
Name of the widget, can be used to set options in an rc file.
-
-visible boolean (default: 1)
-
Whether or not the item is visible.
-
-heightGroup string (default: "")
-
The -heightGroup option can be an arbitrary string. All widgets with the same
heightGroup request the same height. If packed with the fill flag
set, they will have nevertheless different heights.
-
-widthGroup string (default: "")
-
The -widthGroup option can be an arbitrary string. All widgets with the same
widthGroup request the same width. If packed with the fill flag set,
they will have nevertheless different widths.
-
-sizeGroup string (default: "")
-
The -sizeGroup option can be an arbitrary string. All widgets with the same
sizeGroup request the same size. If packed with the fill flag set,
they will have nevertheless different sizes.
Description
The progressbar gives the user feedback of background work which
takes some time. If the application knows how long the work takes, it
should set the activityMode to false (the default) and inform the
user in regular intervals via -fraction and -text how long the work
still takes. If the time span cannot be estimated, activityMode can
be set. By regularly calling the command pulse the user can be
informed, that the application is still alive and work is going on.
Commands
- id delete
-
Deletes the widget and the associated tcl command.
-
id configure [-option
value...]
-
Configures the widget. Option may have any of the values accepted on
creation of the widget.
-
id pulse
-
In activityMode: moves the block by pulseStep.
Exampleset f 0.33
set progress [gnocl::progressBar \
-fraction $f \
-text [format "%.0f %%" [expr {$f*100.}]]]
gnocl::window \
-title "ProgressBar" \
-child $progress
|
|