|
|
|
|
|
LooperRefreshVisible (Function) 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: - Open the Looper control description window.
- On the "Details" tab, in the "Moves and gestures" area, check "Deslizar hacia abajo para actualizar (Pull to refresh)".
- Validate.
Note: This function is only available in WINDEV for use in simulator mode.. Used in a WINDEV application, this function has no effect. // 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 ThreadExecute("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 PROCEDURE 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
Sintaxis
Changing the state of the refresh bar Ocultar los detalles
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 Ocultar los detalles
<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. Observaciones - 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 function ExecuteProcess with constant trtPullToRefresh. - To hide the refresh bar, LooperRefreshVisible(False) must be called as many times as LooperRefreshVisible(True) was run.
Componente: wd300android.aar
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|