BBjProgressBar::setIndeterminate

Description

In BBj 3.0 and higher, this method sets whether the BBjProgressBar is indeterminate. This option is not available on all platforms.

Syntax

Return Value

Method

void

setIndeterminate(boolean indeterminate)

Parameters

Variable

Description

indeterminate

Sets whether the progress bar is indeterminate.

0 = Progress bar has a fixed range, which can be retrieved with getMinimum() and getMaximum().

1 = Progress bar is indeterminate, indicating that the duration of the task is not yet known.

Return Value

None.

Remarks

By default, a progress bar not indeterminate. It has a fixed range, which defaults to minimum = 0 and maximum = 100.

If indeterminate progress bars are not supported on a given platform, this method is ignored. Subsequent calls to BBjProgressBar::isIndeterminate() will return 0.

Example

rem ' BBjProgressBar::setIndeterminate Example

rem ' BBjProgressBar::setIndeterminate
sysgui = UNT
OPEN (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjProgressBar::setIndeterminate"
flags$ = $00090003$
window! = sysgui!.addWindow(100,100,300,100,title$,flags$)
window!.setCallback(window!.ON_CLOSE,"eoj")
startButton! = window!.addButton(1,5,10,90,30,"Start",$0000$)
startButton!.setCallback(startButton!.ON_BUTTON_PUSH,"doStart")
stopButton! = window!.addButton(2,105,10,90,30,"Stop",$0001$)
stopButton!.setCallback(stopButton!.ON_BUTTON_PUSH,"doStop")
progressbar! = window!.addProgressBar(101,5,50,290,30)
process_events

eoj:
release

doStart:
    startButton!.setEnabled(0)
    ProgressBar!.setIndeterminate(1)
    ProgressBar!.setText("Busy...")
    ProgressBar!.setValue(100)
    stopButton!.setEnabled(1)
return

doStop:
    stopButton!.setEnabled(0)
    ProgressBar!.setValue(0)
    ProgressBar!.setIndeterminate(0)
    ProgressBar!.setText("Indeterminate Progress Bar")
    startButton!.setEnabled(1)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.