WSDOT Custom Scripting for Hyperion

ProgressBar.MaxValue Method

Gets or sets the maximum value of the ProgressBar object.
object.MaxValue ([value])

Arguments

object
Required. Always the name of a ProgressBar object.


value
Optional. The value to which to set the property.



Return Value

The ProgressBar.MaxValue property returns the current maximum value of the ProgressBar.



Remarks

The portion of the ProgressBar that is filled is computed as Value / MaxValue.

When attemting to set the property value, it is good to check the return value to ensure that the value was set.

The following example illustrates the use of the Value property.

var dash = ActiveDocument.Sections["Dashboard"];
dash.pb0001 = new wsdot_ProgressBar(dash);
with (dash.pb0001) {
	Left(300);
	Top(200);
	Height(32);
	Width(160);
	Value(0);
	var iMaxValue = MaxValue(100);
	if (iMaxValue == 100) {
		// success
	}
	Show();
	for (var i = 1; i <= dash.pb0001.MaxValue() / 2; i++) {
		var a = (new Date()).valueOf();
		while ((new Date()).valueOf() - a < 10) {
			DoEvents();
			DoEvents();
		}
		dash.pb0001.Value(i * 2);
	}
}


Applies To:

ProgressBar Object



Requirements

The WSDOT Custom Scripts from the script repository must be loaded into the document.