www.icetips.com  Icetips Utilities Documentation 1/14/2012    

Progress Class:  Init

Previous  Top  Next  


Prototype: (LONG pProgressControl, Long pTotalValue, Byte pHideUnhide=1, Byte pCanBeZeroOrOne=True)

 

pProgressControlFEQ of the progress bar control that the class updates
pTotalValueTotal value to be processed
pHideUnhideIndicates if the progress bar control and any other controls in the DisplayControls queue property should be unhidden when the process starts and hidden when it ends.  Defaults to 1 (True)
pCanBeZeroOrOneIndicates if the pTotalValue can be 0 or 1.  Defaults to True.  You never need to change this setting.  This was originally added because the order of the 2nd and 3rd parameters changed. 

 

This method sets up the progress class.  It sets the PROP:RangeLow and PROP:RangeHigh for the progress bar control and sets the TotalValue property.  It also sets the ProgressControl property and creates the DisplayControls queue property.  It also sets the HideControls property and finally calls the Calculate method.  Once the progress class is initialized you can add additional controls to be updated along with the progress bar.  You call this method at the start of the progress process.

 

Example:

ITP  ITProgressClass

Q1   Queue

F1     Long

     End

Q2   Queue

F2     Byte

     End

I    Long

 Code

 !! Queues are filled here.

 ITP.Init(?Progress1,Records(Q1),True)  !! Initialize with the number of records from Q1

 ITP.AddToCurrentValue(Records(Q2))     !! Add the number of records from Q2

 Loop I = 1 To Records(Q1)

   Get(Q1,I)

   !! Do something

   ITP.Update

 End

 

 Loop I = 1 To Records(Q2)

   Get(Q2,I)

   !! Do something

   ITP.Update

 End

 ITP.Kill

 

See also:

DisplayControls
ProgressControl
Update
Kill
 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/init_progress.htm