gtk-sharp Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Widget Gtk.IOrientable 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
  Creates a new .
  Creates a new .
- Constructor
  Pointer to the C object.
  Internal constructor

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

- Property
  GLib.Property("ellipsize")
  Pango.EllipsizeMode To be added a To be added
- Property
  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
  GLib.GType GType Property. a Returns the native value for .
- Property
  GLib.Property("inverted")
  System.Boolean To be added. To be added. To be added.
- Property
  GLib.Property("orientation")
  Gtk.Orientation The current orientation. an object of type The current orientation.
- Method
  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
  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
  GLib.Property("show-text")
  System.Boolean To be added. To be added. To be added.
- Property
  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 .