WebProgressBar displays disabled while still enabled

I am having a strange little issue where I am displaying a WebProgressBar on a page during a database task and the bar is updating properly and everything looks great the first time you do the task. If you start the task again though the progress bar is displaying as disabled (incorrectly). There is no code disabling the bar and if you look at it in the debugger it says WebProgressBar.Enabled=true! Is this a known bug or am I doing something wrong?

Code that disables UI - but turns on ProgressBar:

  //Just get the UI timer set up and start the thread
  myTask = RadioGroup1.SelectedCaption
  myWorking = True
  myProgress = 0
  myProgressEnd = 0
  ProgressBar1.Value = 2
  ProgressBar1.Maximum = 100
  ProgressBar1.Visible = true
  ProgressBar1.Enabled = true
  UITimer.Mode = Timer.ModeMultiple
  SyncButton.Enabled = false
  RadioGroup1.Enabled = false

Code that re-enables it and hides ProgressBar:

    // Done - clear up UI values
    ProgressBar1.Visible = false
    myProgress = 0
    myProgressEnd = 0
    SyncButton.Enabled = true
    RadioGroup1.Enabled = true
    me.Mode = Timer.ModeOff

As you can see I have even added ‘ProgressBar1.Enabled = true’ to try to force it to be enabled but it keeps appearing disabled.


It looks this way when the web app is viewed in Safari & Chrome on Mac and IE on Windows - built the app for mac and also for linux - same result…(standalone app).

i have this same issue. i’m on windows. did you find a solution?

Working on RubberViews for Web Edition running in the IDE , I noticed the WebProgressBar often does not display entirely right way like other controls, but after one or two seconds. And, occasionally, it does what is posted above : it looks disabled. But it seems that does not impact build executable when it is installed on the host. Could be due to the overhead needed by the debugger.

Ah. Ok I will see what it looks like when it’s compiled. Thanks.

Ive rolled my own version now anyway, so i can set the bar colour etc.

So did I a while ago, but as I need RubberViews to support all standard controls, I had to deal with the native one. The behavior of WE in the IDE is not quite right anyway. I posted something about very slow pages on Chrome last week, so I switched to Safari that behaves somewhat more responsive, but still, there are unexplained lag. Sometimes, it takes up to two seconds for something to happen in the browser. In the profiler, response time never exceeds 40 Microseconds. …

I have noticed that the segmented control takes an age to redraw in the ide.

@Russ Lunn : The solution I found is to use a custom progress bar which was provided somewhere else on the forum. I am quoting in the link below from another post on another thread. It was a good workaround for me AND had the bonus of setting a custom color. Check it out:

[quote=127610:@Michel Bujardet]I just put together a small custom control called WebColorProgressBar.


Download by right click then save as, and drag into your project. Then drag an instance over the WebPage or Dialog.

WebColorProgressBar.Maximum and WebColorProgressBar.Value work like the regular control.

WebColorProgressBar.BarColor is the color of the bar. &c00FF2800 as default (the same kind of green as in Windows).

You can make the bar any width and any height, so it is possible to have a very narrow or very heavy ProgressBar.

Because Web Applications do not update the UI while an event is not over, you cannot expect the change of value to update immediately while in an event. Better use a timer which will update the value.

For instance, this moves the bar from a timer Action event :

Sub Action() if ColorProgressBar1.Value < ColorProgressBar1.Maximum then ColorProgressBar1.value = ColorProgressBar1.value+1 end if End Sub

This control is server-side, so it will not be as fluid as the native one. But the color can be set.[/quote]

I drag the WebcolorProgressbar in my Project But I dont know ,how to show that .Please can any one tell me ,how to show webcolorprogressbar to the action event of button .

Thanks in advance

See the example /Applications/Xojo 2016 Release 3/Example Projects/Web/Controls/ProgressBar.xojo_binary_project for how to move it. It is a tad more complicated than a simple button.