|
|
|
|
|
<Looper>.RefreshVisible (Function) In french: <Zone répétée>.RafraîchissementVisible Changes or returns the visibility status of the refresh bar in a Looper control. This function can be used when the Looper control supports the "Pull-to-refresh" option. To enable this option in a Looper control: - Open the Looper control description window.
- On the "Details" tab, in the "Moves and gestures" area, check "Pull to refresh".
- Validate.
Note: This function is only available in WINDEV for use in simulator mode.. Used in a WINDEV application, this function has no effect.
LOOP_Data.RefreshVisible(True)
ThreadExecute("threadUPDLoop", threadNormal, ProcThreadUPDLoop)
// Procedure for refreshing the data of the Looper control PROCEDURE ProcThreadUPDLoop() // Run an HTTP request HTTPRequest(...) // Go back to the main thread to add the request content into the // Looper control ExecuteMainThread(ProcUPDLoop, HTTPGetResult()) END
PROCEDURE ProcUPDLoop(sData is string)
...
LOOP_Data.RefreshVisible(False)
END
Syntax
Changing the state of the refresh bar Hide the details
<Looper control>.RefreshVisible(<Visible>)
<Looper control>: Control name Name of the Looper control to be used. <Visible>: Boolean - True to display the refresh bar,
- False to hide it.
Getting the state of the refresh bar Hide the details
<Result> = <Looper control>.RefreshVisible()
<Result>: Boolean - True if the refresh bar is displayed,
- False if the refresh bar is hidden.
<Looper control>: Control name Name of the Looper control to be used. Remarks - During a "Pull-to-refresh", the refresh bar corresponds to the area displayed above the cells of the Looper control during the data refresh.
- <Looper>.RefreshVisible is used, for example, to manage how the refresh bar is displayed when the data from the Looper control is refreshed in a secondary thread. This prevents the application from freezing (the example uses this method).
- When the refresh bar is shown by <Looper>.RefreshVisible, the "Pull to refresh" event of the Looper control is not executed.
Note: It is possible to force execution of this event by using function ExecuteProcess with constant trtPullToRefresh. - To hide the refresh bar, <Looper>.RefreshVisible(False) must be called as many times as <Looper>.RefreshVisible(True) was run.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|