Form

GPALProgressBar

Everything on Settings Every Control Takes applies here too. GPAL.ProgressBar builds one. WithMinimum and WithMaximum set the range, WithValue where it starts, and WithStyle the look: Blocks, Continuous, or Marquee for work whose size is not known. The Value property moves it at runtime from any thread, which is what a workflow updates as it goes. GPAL.ProgressBarFor(maximum) is the shorthand.

Examples

GPAL Fluent: High-level fluent C# API

//Value is marshalled by GPAL, so a workflow running off the UI thread sets it directly.

GPALProgressBar progress = (GPALProgressBar)GPAL.ProgressBar

.WithMinimum(0)

.WithMaximum(100)

.WithStyle(ProgressBarStyle.Continuous)

.WithName("progress");


// from the workflow, while the form is up

for (int page = 1; page <= pages; page++)

{

browser.WithSelector(nextPage).LeftClick();

progress.Value = page * 100 / pages;

status.Text = $"Page {page} of {pages}";

}

💬 Ask GPAL