PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

This page concerns the 23 + version of WINDEV Mobile. Upgrade your version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
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. Display the description window of window.
  2. In the "Details" tab, in the "Other parameters" area, check "Pull to refresh".
  3. Validate.
Example
// "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
HTTPRequest(...)
// Goes back to the main thread to display the request content in the window
ExecuteMainThread(ProcUpdUI, HTTPGetResult())
END
// ---------------------------------------------------
//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)
END
Syntax

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.
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 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.
    Note: 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.
Components
Android wd230android.jar
Minimum required version
  • Version 23
Comments
Click [Add] to post a comment