Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3986

Xojo2025R1: WebThread, WebListBox with DataSource - refreshing page

$
0
0

I have DataSource class and the RefreshDataSourceThread class, they are used on WebPages with WebListBoxes. The “shelf” of the WebPage has the PageDataSource and PageThread.
I use this approach as I have multiple pages with several list boxes using datasource.

The App class has method DataSourceRefreshFinished loops through sessions and calls session Refresh method.

The app Session has Refresh method that calls relevant page DoDataSourceRefresh method, I am also passing “sender” parameter to it. I use Spinner control on the WebPage to indicate “fetching data and loading list”.

Everything seems to be working fine; however, there is one little thing that bothers me.
The Spinner becomes invisible when DoDataSourceRefresh method is called, but it takes a little time (few seconds) before the WebListBox actually shows the data.

The typical DoDataSourceRefresh method looks like this:

Select Case sender
Case IsA MyThread
  MyDataSource.RefreshCache
  Spinner.Visible = False
  Spinner.UpdateBrowser
End Select

where

optional sender As RefreshDataSourceThread

Is there a way to keep Spinner visible until the data actually shows in the WebListBox?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 3986

Trending Articles