gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Widget A widget which indicates progress visually.

The is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The can be used in two different modes: percentage mode and activity mode.

When an application can determine how much work needs to take place (e.g. read a fixed number of bytes from a file) and can monitor its progress, it can use the in percentage mode and the user sees a growing bar indicating the percentage of the work that has been completed. In this mode, the application is required to set periodically to update the progress bar.

When an application has no accurate way of knowing the amount of work to do, it can use the in activity mode, which shows activity by a block moving back and forth within the progress area. In this mode, the application is required to call perodically to update the progress bar.

There is quite a bit of flexibility provided to control the appearance of the . Functions are provided to control the orientation of the bar, optional text can be displayed along with the bar, and the step size used in activity mode can be set.

The following example show how percentage mode works

`using System; using Gtk; namespace TestGtkAlone { public class TestProgress { static Gtk.ProgressBar PBar; static void Main() { Gtk.Application.Init(); Gtk.Window WinPBar = new Window("Test Progress bar - Percentage mode"); Gtk.HBox HContainer = new Gtk.HBox(false, 2); PBar = new ProgressBar(); Gtk.Button ButtonStart = new Gtk.Button("Start Progress"); HContainer.Add(PBar); HContainer.Add(ButtonStart); ButtonStart.Clicked += new EventHandler(ButtonStart_Clicked); WinPBar.Add(HContainer); WinPBar.ShowAll(); Gtk.Application.Run(); } public static void ButtonStart_Clicked(object sender, EventArgs args) { PBar.Adjustment.Lower = 0; PBar.Adjustment.Upper = 1000; while (PBar.Adjustment.Value < PBar.Adjustment.Upper) { PBar.Adjustment.Value+=1; } } } }`
- Constructor
  2.12.0.0
  Creates a new .
  Creates a new .
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected Constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  a
  Public constructor.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Property
  2.12.0.0
  GLib.Property("activity-blocks")
  System.Obsolete
  System.UInt32 The number of blocks used when the is in activity mode. an object of type The number of blocks used when the is in activity mode. Larger numbers make the visible block smaller.
- Property
  2.12.0.0
  GLib.Property("activity-step")
  System.Obsolete
  System.UInt32 The step value used when the is in activity mode. an object of type The step value used when the is in activity mode. The step is the amount by which the progress is incremented each iteration.
- Property
  2.12.0.0
  GLib.Property("adjustment")
  Gtk.Adjustment Details about the increments used in updating the ProgressBar. an object of type
- Property
  2.12.0.0
  GLib.Property("bar-style")
  System.Obsolete
  Gtk.ProgressBarStyle The style for drawing the . an object of type The style for drawing the . Continuous - The grows in a smooth, continuous manner. Discrete - The grows in discrete, visible blocks.
- Property
  2.12.0.0
  GLib.Property("discrete-blocks")
  System.Obsolete
  System.UInt32 The number of blocks that the is divided into. an object of type The number of blocks that the is divided into when the style is discrete.
- Property
  2.12.0.0
  GLib.Property("ellipsize")
  Pango.EllipsizeMode To be added a To be added
- Property
  2.12.0.0
  GLib.Property("fraction")
  System.Double The current fraction of the task that has been completed. an object of type The current fraction of the task that has been completed.
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  GLib.Property("orientation")
  Gtk.ProgressBarOrientation The current orientation. an object of type The current orientation.
- Method
  2.12.0.0
  System.Void Indicates an unknown amount of progress has been made Indicates that some progress has been made, but you don't know how much. This causes the to enter "activity mode," where a block bounces back and forth. Each call to causes the block to move by a little bit (the amount of movement per pulse is determined by ).
- Property
  2.12.0.0
  GLib.Property("pulse-step")
  System.Double The fraction of total length to move the bouncing block for each call to . an object of type The fraction of total length to move the bouncing block for each call to .
- Property
  2.12.0.0
  GLib.Property("text")
  System.String The text displayed superimposed on the . an object of type The text displayed superimposed on the , if any, otherwise . The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the .
- Method
  2.12.0.0
  System.Obsolete
  System.Void `` a , the percentage completed this bar should display. Update the progress bar with a new percentage-done. It's marked as obsolete - it's better to use