|
|
|
|
|
- Overview
- Table or Looper control settings
- Implementation
- Events added
- Limitations
- Customizing the loading window or page
- "Add additional elements" event
- Populating the control at the top and/or bottom
- Programming
Infinite Table and Looper controls
There are two methods to populate Table and Looper controls programmatically: - Populating the entire control: All data present in the control is loaded when the control is initialized.
Advantage: All values are present in the control. You can sort and search the elements contained in the control. Disadvantage: The control and its data can use a significant amount of memory. In the case of mobile applications, this full loading mode can be slow and consume unnecessary bandwidth. - Populating the control if necessary (infinite Table and Looper): Only data visible to the user is loaded into memory. Additional data is loaded only if the user scrolls the view.
Advantage: Low memory usage. In the case of mobile applications, this means faster data visualization and lower bandwidth consumption. Disadvantage: No sort or search functionalities are available until all data is available.
Table or Looper control settings Events added The Table control or Infinite RepeatString setting has added: In WINDEV and WINDEV Mobile: - Add additional elements at the bottom.
New in version 2025Add additional elements at the top.
Limitations You cannot use the infinite data loading mode for: - Horizontal Looper, data-bound Looper and multi-column Looper controls.
- Data-bound Table controls.
Customizing the loading window or page The progress bar is contained in an internal window or page. "Add additional elements" event The "Add additional elements" event must contain the code for refreshing data in the control. By default, the internal loading window is displayed while running this code. At the end of code execution, the internal loading window will be automatically hidden. Note: This event is automatically called: - when initializing the window, if the control is empty.
- after the window initialization, if all the control rows are visible
- after the control is enlarged and all rows become visible.
- after scrolling down, if the last row is visible.
Note: If the default internal window is selected, a progress bar (loading window) is displayed while the "Add additional elements" event is executed. This progress bar will be displayed only if the main thread can be run while running the "Adding additional elements" event. To see the progress bar, you must run a long refresh process (HTTP request or HFSQL iteration, for example) in a thread run from the "Add additional elements" event. In this case, the progress bar must be managed using TableAddInProgress and LooperAddInProgress. Example of code for the "Add additional elements" event:
Fill in a Table control with the last unread emails: SessionID is int
EmailRead is Email
EmailReadFirst(SessionID, EmailRead, emailUnread)
WHILE NOT Email.Out
TableAddLine(TABLE_Email, EmailRead.Sender, EmailRead.ReceiveDate, EmailRead.MessageID)
EmailReadNext(SessionID, EmailRead, emailUnread)
END
Note: If the "Add additional elements" event returns False: - the internal loading window is no longer displayed,
- the "Add additional elements" event is no longer executed.
New in version 2025
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|