ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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. In the "Details" tab, in the "Moves and gestures" area, check "Pull to refresh".
  3. Validate.
WINDEV This function is available in WINDEV only in order to be used in simulator mode. Used in a WINDEV application, this function has no effect.
Example
// Event "Pull to refresh" of a Looper control
// -----------------------------------------------------------------------------
// Check the display of selection bar because the refresh of
// Looper control data will be performed in a secondary thread.
// Otherwise, the refresh bar would be automatically hidden at the
// end of process execution.
LooperRefreshVisible(LOOP_Data, True)
// Refreshes the data of the Looper control in a secondary thread
ThreadExécute("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 for filling data in the Looper control
PROCÉDURE ProcUPDLoop(sData is string)
// Process the received data in order to populate the Looper control
...
// The Looper control data is refreshed,
// hide the refresh bar
LooperRefreshVisible(LOOP_Data, 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.
    Remark: You can force the execution of this event by using ExecuteProcess with the trtPullToRefresh constant.
  • To hide the refresh bar, LooperRefreshVisible(False) must be called as many times as LooperRefreshVisible(True) was run.
Component: wd290java.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help