Home | Sign in | English EN
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Modifies or returns the visibility status of 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. In the "Details" tab, in the "Other parameters" area, check "Pull to refresh".
  3. Validate.
// "Refreshing data" process of window
// -------------------------------------------------------------
// Asks to check the display of selection bar because the refresh of
// window data will be performed in a secondary thread.
// Otherwise, the refresh bar would be automatically hidden at the
// end of process execution.
WinRefreshVisible(WIN_Products, True)
// Refreshes the window data in a secondary thread
ThreadExecute("threadUpdWindow", threadNormal, ProcThreadUpdWin)
// Procedure for updating the window data
PROCÉDURE ProcThreadUpdWin()
// Run an HTTP request
// Goes back to the main thread to display the request content in the window
ExecuteMainThread(ProcUpdUI, HTTPGetResult())
// ---------------------------------------------------
//Procedure for refreshing the window interface
PROCÉDURE ProcUpdUI(sData is string)
// Process the data received
// ...
// The data is updated, hide the refresh bar
WinRefreshVisible(WIN_Products, False)

Modifying the visibility status of refresh bar Hide the details

WinRefreshVisible(<Window> , <Visible>)
<Window>: Character string (with or without quotes)
Name of window to use.
<Visible>: Boolean
  • True to display the refresh bar,
  • False to hide it.

Finding out the visibility status of 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>: Character string (with or without quotes)
Name of window to use.
  • 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 being locked (the example is using this method).
  • When the refresh bar is made visible by WinRefreshVisible, the "Pull to refresh" process of window is not run.
    Remark: To force the execution of this process, use ExecuteProcess associated with the trtPullToRefresh constant.
  • To hide the refresh bar, WinRefreshVisible(False) must be called as many times as WinRefreshVisible(True) was run.
Component : wd260android.jar
Minimum version required
  • Version 23
Click [Add] to post a comment