Skip to content

piMinimum - cProgressBar

Maintains the value that represents zero percent of the range the progress bar covers

Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None

Syntax

Property Integer piMinimum
Access Type Syntax
Read Access: Get piMinimum to IntegerVariable
Write Access: Set piMinimum to IntegerVariable/Value

Description

piMinimum maintains the value that represents zero percent of the range the progress bar covers. Set to any valid integer, but less than piMaximum. Setting this property automatically sets the piPosition property to the same value.

Sample

This sample shows you might open a file for sequential I/O and use the file's size to determine the maximim progress bar setting, so that the progress bar can be updated with the number of bytes read while the file's data is being read.

Object oProgressBar1 is a cProgressBar
    Set Size to 14 100
    Set Location to 45 40
    Set piMinimum to 0
End_Object

Object oReadButton is a Button
    Set Location to 118 37
    Set Label to "FileSize"

    Procedure ReadFile channel iChIn
        String sFileName
        Integer iSize iCurrentLocation

        Set piMinimum of oProgressBar1 to 0  // this sets piPosition to 0, as well

        Get Value of oFileNameForm to sFileName
        Direct_Input channel iChIn sFileName

        // set max position to channel size
        Get_Channel_Size iChIn to iSize
        Set piMaximum of oProgressBar1 to iSize
        ...
        while not [seqeof]
            readln channel iChIn sLine

            // update current progress bar position
            Get_Channel_Location iChIn to iCurrentLocation
            set piPosition to iCurrentLocation
        loop

        close_input channel iChIn
    End_Procedure    
End_Object

See Also

piMaximum | piPosition | Sequential File Input and Output