WebProgressWheel Visible

Hello,

for loading Data into the Web Page we want to use the WebProgressWheel to show up activity to the user. At first startup it displays fine, but if we set the webprogresswheel to visible=false and again to visible=true, it get not displayed again.
I looked into it with firebug and i found out that on setting false you add a style display:none, but on visible=true, this get not removed. So i think this causes the problem.
xojo code
if loading then
ProgressWheel1.Visible = true
else
ProgressWheel1.Visible = false
end if

Version:Xojo2014r2
thanks for help

Where about in your code are you setting the WebProgressWheel back to be Visible, is it at the beginning of a function that then does some processing and then at the end makes it invisible again?

Or do you make it Visible and then start the real work from a WebTimer or similar so that the command to make the control visible is sent (commands are generally sent to the browser at the end of a function, kind of) and then the control is made invisible when the timer finishes its work?

[quote=113504:@Robert Neuwirth]Hello,

for loading Data into the Web Page we want to use the WebProgressWheel to show up activity to the user. At first startup it displays fine, but if we set the webprogresswheel to visible=false and again to visible=true, it get not displayed again.
I looked into it with firebug and i found out that on setting false you add a style display:none, but on visible=true, this get not removed. So i think this causes the problem.
xojo code
if loading then
ProgressWheel1.Visible = true
else
ProgressWheel1.Visible = false
end if

Version:Xojo2014r2
thanks for help[/quote]

I just created a small test project with a progress wheel and in a button action :
Sub Action()
ProgressWheel1.visible = not ProgressWheel1.visible
End Sub

It appears and disappears fine. So something else may be happening. You may want to add a system.debuglog close to ProgressWheel1.Visible = true to see if the code is executed.

In any case, if you think you’ve found a bug, create a simple project which shows the bug and file a report in Feedback.

I know it’s an old threat, but I ran into the exact same problem. So, I prefer not to open a new conversation.
I have just created a test project, with two buttons. One implements a toggling function like Michel proposed and works as expected.
The other button action will make that the wheel is disappear forever. GetData() could be a function to get some data out of a database, or something the like.

Sub Action()
ProgressWheel1.Visible=True
GetData()  'Takes some seconds
ProgressWheel1.Visible=False
End Sub

Anything wrong here or could this be a bug ?

Xojo 2017R3
MacOs 10.13.2

Not a bug. The event loop needs to complete to send instructions to the browser, so all the browser receives is Visible=False after the work completes. Even on the desktop, the right solution is to do the work in a way that doesn’t block the event loop, such as a by using a thread. You watch the progress somehow with a timer and make the wheel invisible when complete.

You can make your ProgressWheel visible in the button’s MouseDown. That way it takes effect before Action, and shows the Progresswheel.

Thank you Michel! This does the trick.