#
Prev |  | Next

# progressBar

## Name

progressBar -- A widget which gives the user feedback of background work.

## Synopsis

progressBar [`-option` `value`...]

## Screenshot

## Options

-activityMode

  type: boolean (default: 0)

  Whether the progressbar shows only, that an activity is going on.

-fraction

  type: 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

  type: ONEOF leftToRight, rightToLeft, bottomToTop, topToBottom (default: leftToRight)

  Direction of the progressbar.

-text

  type: string (default: "")

  Only if activityMode is false: text to be shown, mostly the fraction of the work done.

-textAlign

  type: a list of the horizontal and vertical alignment or one of topLeft, top, topRight, left, center, right, bottomLeft, bottom, or bottomRight (default: center)

  Alignment of the text.

-showText

  type: boolean (default: 1)

  Whether to show the text.

-name

  type: string

  Name of the widget, can be used to set options in an rc file.

-visible

  type: boolean (default: 1)

  Whether or not the item is visible.

-heightGroup

  type: string (default: "")

  heightGroup 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

  type: string (default: "")

  widthGroup 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

  type: string (default: "")

  sizeGroup 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.

## Example

    set f 0.33
    set progress [gnocl::progressBar -fraction $f -text [format "%.0f %%" [expr {$f*100.}]]]
    gnocl::window -title "ProgressBar" -child $progress

results in

## See also

`GtkProgessBar`

Prev | Home | Next
image | Up | statusBar