Progress Wheel won´t show, help?

Hi!

I’m attempting to display a progress wheel control when I start an query and make it invisible when the query is done. This is the code I have inside a method:


self.contribuyentesListBox.DeleteAllRows

self.ProgressWheel1.Visible = true // <--- This code does not make the progresswheel visible :-(

sql = "SELECT * FROM CAT_CONTRIBUYENTES_VIEW "

// Some more code that works as expected

rs.Close
self.ProgressWheel1.Visible = false

Any ideas?

Thanks in advance

@Hector Marroquin — You chose target Web but you are using ProgressWheel instead of WebProgressWheel ? Something is wrong here. Can you clarify?

Define a timer with

  • mode = none
  • period = 1
  • place your select into the timer action event
    Then:
  • show the progress wheel
  • start the timer (mode = single)
  • when action’s done, reset the time mode to none and hide the progress wheel

I meant the webProgressWheel :wink:

[quote=470080:@Olivier Colard]Define a timer with

  • mode = none
  • period = 1
  • place your select into the timer action event
    Then:
  • show the progress wheel
  • start the timer (mode = single)
  • when action’s done, reset the time mode to none and hide the progress wheel[/quote]

Thanks, I’ll try this approach

Web cannot update the UI from within a single event.

You need to show the ProgressWheel in one, and hide it in another.

Basically, you want to show the webprogresswhel first, then do your query, and hide the webprogresswheel in the end.

No need for a timer, if you can use two different events.

For instance, in a WebButton, you can use Mousedown for this:

self.ProgressWheel1.Visible = true // <--- This code does not make the progresswheel visible :-(

And put the rest of the code in the Action event of the button.

Thank you Michel!

Got it working using your advice.