Next: , Previous: , Up: GUI Development   [Contents][Index]


35.2 Progress Bar

: h = waitbar (frac)
: h = waitbar (frac, msg)
: h = waitbar (…, "createcancelbtn", fcn, …)
: h = waitbar (…, prop, val, …)
: waitbar (frac)
: waitbar (frac, h)
: waitbar (frac, h, msg)

Return a handle h to a new progress indicator ("waitbar") object.

The waitbar is filled to fraction frac which must be in the range [0, 1].

The optional message msg is centered and displayed above the waitbar.

A cancel button can be added to the bottom of the waitbar using the "createcancelbtn" property of waitbar figures. The action to be executed when the user presses the button is specified using a string or function handle fcn.

The appearance of the waitbar figure window can be configured by passing prop/val pairs to the function.

When called with a single input the current waitbar, if it exists, is updated to the new value frac. If there are multiple outstanding waitbars they can be updated individually by passing the handle h of the specific waitbar to modify.

See also: delete.