PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Configuring the control
  • "Adding additional elements" process
  • Customizing the wait window
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A memory Table and/or Looper control can be filled according to two methods:
  • Filling the entire control: The entire data found in the control is loaded when initializing the control.
    Benefit: All the values are found in the control. You have the ability to perform searches or sorts on the elements found in the control.
    Drawback: The memory footprint of the control and data may be quite important. For the mobile applications, the full load may consume bandwidth and slow down the display.
  • Versions 21 and later
    Filling the control if necessary (infinite Table and Looper): Only the data visible by the user is loaded in memory. The additional data is loaded upon request (when using the scrollbar for example).
    Benefit: Low memory footprint. For the mobile applications, increased display speed and reduced bandwidth consumption.
    Drawback: No sort and no search as long as the entire data is not available.
    New in version 21
    Filling the control if necessary (infinite Table and Looper): Only the data visible by the user is loaded in memory. The additional data is loaded upon request (when using the scrollbar for example).
    Benefit: Low memory footprint. For the mobile applications, increased display speed and reduced bandwidth consumption.
    Drawback: No sort and no search as long as the entire data is not available.
    Filling the control if necessary (infinite Table and Looper): Only the data visible by the user is loaded in memory. The additional data is loaded upon request (when using the scrollbar for example).
    Benefit: Low memory footprint. For the mobile applications, increased display speed and reduced bandwidth consumption.
    Drawback: No sort and no search as long as the entire data is not available.
How to proceed?

Configuring the control

To enable the mechanism for filling the control if necessary (Infinite table/Infinite looper):
  1. Display the description window of control.
  2. In the "Content" tab, in the "Infinite table"/"Infinite looper" section:
    • Check "Call the process for adding additional elements at the end of scroll".
    • Select the wait internal window displayed when loading additional rows. You can:
      • Use the default wait window,
      • Use the preset window. If this option is selected, the preset internal window is immediately added into the current project and it is associated with the feature.
        Note: We advise you to copy the window into the directory of current project. In WINDEV, the internal window is named "IW_AddAdditionalElement_WD". In WINDEV Mobile, the internal window is named "IW_AddAdditionalElement_WM".
      • Use an internal window of your project.
    • Specify the maximum number of rows: This number corresponds to the maximum number of rows that can be added to the control. When this number is reached, the "Adding additional elements" process will not be called anymore.
  3. Validate the description window of control.
When configuring the infinite Table or Looper control, the "Adding additional elements" process was added into the control processes.
Note: This option is not available for:
  • the horizontal Looper controls, the browsing Looper controls and the multicolumn Looper controls.
  • the browsing Table controls.

"Adding additional elements" process

The "Adding additional elements" process must contain the code for refreshing data in the control. By default, the internal wait window is displayed while running this process. At the end of code execution, the internal wait window will be automatically hidden.
Note: This process is automatically called:
  • when initializing the window, if the control is empty.
  • after the window initialization, if all the control rows are visible
  • once the control was enlarged, if all the control rows are visible (while they were not visible before the enlargement).
  • after a scroll to the bottom, if the last control row is visible.
Caution: If the default internal window is selected, a progress bar (wait window) is displayed while running the "Adding additional elements" process. This progress bar will be displayed only if the main thread can be run while running the "Adding additional elements" process .
To see the progress bar, you must perform the long refresh process (HTTP request or HFSQL browse for example) in a thread run from the "Adding additional elements" process. In this case, the progress bar must be managed by TableAddInProgress and LooperAddInProgress.
Example of "Adding additional elements" process: Filling a Table control with the last unread emails:
nSessionID is int
EmailRead is Email

// Loads the last unread messages
EmailReadFirst(nSessionID,EmailRead, emailUnread)
WHILE NOT Email.Out
// Process the message
TableAddLine(TABLE_Email, EmailRead.Sender, EmailRead.ReceiveDate, EmailRead.MessageID)
EmailReadNext(nSessionID,EmailRead, emailUnread)
END
Note: If the "Adding additional elements" process returns False:
  • the internal wait window is not displayed anymore,
  • the "Adding additional elements" process is not run anymore.

Customizing the wait window

The progress bar displayed during the load is found in an internal window.
A standard internal window is used by default but it can be included in the project for customization.
The progress bar is automatically managed. The internal window used must contain a single infinite Progress Bar control.
Minimum required version
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment