Refresh

<< Click to Display Table of Contents >>

 

Refresh

Refresh([Force])

This method allows forcing a redrawn of a Screen's or Splitter's content. It must be used in Elipse E3 Viewer scripts with massive processing, such as loops, or in method calls demanding a long time and also demanding a visual indication for the progress of a process to users.

Due to the general redrawn being a heavy operation, the default version of this method, without the Force parameter, is optimized to ignore redrawn requests from Elipse E3. This standard behavior is ideal for loop progress indications, in which a lot of redrawing is performed. The Force parameter disables this optimization, ensuring that for each call to this method, a redrawn is performed. However, when using this option, this method cannot be called repeatedly, such as inside a loop, according to the next example.

Sub CommandButton1_Click()
  ' Draws a progress bar for an operation
  While i < 31
    Screen.Item("Rectangle2")_
      .HorizontalPercentFill = (i / 30) * 100
    Frame.Refresh True
    ' <-- some lengthy operation -->
  Wend
End Sub

Was this page useful?