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 / Window functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Modifies or returns the visibility state of the refresh bar in a window.
This function can be used when the window supports the "Pull-to-refresh" option. To enable this option in a window:
  1. Open the window description.
  2. On the "Details" tab, in the "Other parameters" area, check "Pull to refresh".
  3. Validate.
Example
// Evénement "Rafraîchissement des données" de la fenêtre
// -------------------------------------------------------------
// Demande à contrôler l'affichage du bandeau de sélection car l'actualisation des
// données de la fenêtre 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 de l'événement.
WinRefreshVisible(FEN_Produits, True)
// Exécute l'actualisation des données de la fenêtre dans un thread secondaire
ThreadExecute("threadMajFen", threadNormal, ProcThreadMajFen)
//----------------------------------------------------
// Procédure de mise à jour des données de la fenêtre
PROCEDURE ProcThreadMajFen()
// Exécution d'une requête HTTP
HTTPRequest(...)
// Retourne dans le thread principal pour afficher le contenu de la requête dans la fenêtre
ExecuteMainThread(ProcMajUI, HTTPGetResult())
END
// ---------------------------------------------------
// Procédure d'actualisation de l'interface de la fenêtre
PROCEDURE ProcMajUI(sDonnees is string)
// Traitement des données reçues 
// ...
// Les données sont à jour, on masque le bandeau de rafraîchissement
WinRefreshVisible(FEN_Produits, False)
END
Syntax

Changing the state of the refresh bar Hide the details

WinRefreshVisible(<Window> , <Visible>)
<Window>: Window name
Name of the window 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> = WinRefreshVisible(<Window>)
<Result>: Boolean
  • True if the refresh bar is displayed,
  • False if the refresh bar is hidden.
<Window>: Window name
Name of the window to be used.
Remarks
  • During a "Pull to refresh", the refresh bar corresponds to the area displayed at the top of window during the data refresh.
  • WinRefreshVisible is used for example to check the display of refresh bar when the data found in the window is refreshed in a secondary thread. This prevents the application from freezing (the example uses this method).
  • When the refresh bar is shown by WinRefreshVisible, the "Pull to refresh" event of the window 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, WinRefreshVisible(False) must be called as many times as WinRefreshVisible(True) was run.
Component: wd300android.aar
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help