ProgressBar_SetPercentage
int ProgressBar_SetPercentage (int panel, int progressBarCtrl, double percentage, char *label);
Purpose
Sets the position of the progress bar to the specified percentage.
If you have milestones defined, setting the percentage of the progress bar does not reset the current milestone. If you set ATTR_PROGRESSBAR_UPDATE_MODE to VAL_PROGRESSBAR_AUTO_MODE, the progress bar continues advancing to the next milestone from the new position.
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. |
percentage | double | The percentage value to which to set the progress bar position. You must specify a double-precision value no less than 0.0 and no greater than 100.0. |
label | char * | You can optionally pass a new label for the control that is suitable to its new position. Pass 0 to leave the label unchanged. |
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