ProgressBar_SetTotalTimeEstimate

int ProgressBar_SetTotalTimeEstimate (int panel, int progressBarCtrl, double expectedTime);

Purpose

Sets the estimated duration of the task that is associated with the progress bar.

LabWindows/CVI uses the estimated total time of the task to determine the rate at which the progress bar advances when you set the ATTR_PROGRESSBAR_UPDATE_MODE attribute to VAL_PROGRESSBAR_AUTO_MODE.

If you enable ATTR_PROGRESSBAR_AUTO_ADJUST, this value can change gradually to match the actual time elapsed in each progress bar session.

When you change the total time estimate, LabWindows/CVI clears the time history for each milestone and resets its estimated time based on the new total time estimate.

You cannot call this function when a session is active.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
progressBarCtrl int The ID you specified as the slideCtrl parameter in the ProgressBar_ConvertFromSlide function call or the ID returned by the ProgressBar_Create function.
expectedTime double The new time estimate for the task, in seconds.

The default time estimate for a new progress bar is 10 seconds.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message.

Additional Information

Library: Progress Bar Control

Include file: custctrl\progressbar.h

LabWindows/CVI compatibility: LabWindows/CVI 2009 and later

WAS THIS ARTICLE HELPFUL?

Not Helpful