ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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:
  1. Open the Looper control description window.
  2. On the "Details" tab, in the "Moves and gestures" area, check "Pull to refresh".
  3. Validate.
Note: This function is only available in WINDEV for use in simulator mode.. Used in a WINDEV application, this function has no effect.
Example
// Evénement "Rafraîchissement par tirer/Relâcher" du champ Zone répétée
// -----------------------------------------------------------------------------
// On demande à contrôler l'affichage du bandeau de sélection car l'actualisation des
// données du champ Zone répétée va être effectuée dans un thread secondaire. 
// Dans le cas contraire, le bandeau de rafraîchissement serait automatiquement masqué à la
// fin de l'exécution du traitement.
LooperRefreshVisible(ZR_Donnees, True)
// Exécute l'actualisation des données du champ Zone répétée dans un thread secondaire
ThreadExecute("threadMajZR", threadNormal, ProcThreadMajZR)
// Procédure de mise à jour des données du champ Zone répétée
PROCEDURE ProcThreadMajZR()
// Exécution d'une requête HTTP
HTTPRequest(...)
// On retourne dans le thread principal pour ajouter le contenu de la requête dans le
// champ Zone répétée
ExecuteMainThread(ProcMajZR, HTTPGetResult())
END
// Procédure de remplissage des données du champ Zone répétée
PROCEDURE ProcMajZR(sDonnees is string)
// Traitement des données reçues pour remplissage du champ Zone répétée
...
// Les données du champ Zone répétée sont à jour, 
// on masque le bandeau de rafraîchissement
LooperRefreshVisible(ZR_Donnees, False)

END
Syntax

Changing the state of the refresh bar Hide the details

LooperRefreshVisible(<Looper control> , <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> = LooperRefreshVisible(<Looper control>)
<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.
  • LooperRefreshVisible 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 LooperRefreshVisible, the "Pull to refresh" event of the Looper control is not executed.
    Note: It is possible to force execution of this event by using the ExecuteProcess function with the constant trtPullToRefresh.
  • To hide the refresh bar, LooperRefreshVisible(False) must be called as many times as LooperRefreshVisible(True) was run.
Component: wd300android.aar
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help