Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Percent pane hides itself
I use the statusbar extensively and almost always, initialise with a "Normal", "Progress Percent" and another "Normal" panes.
The "progress percent" pane I make invisible and only display it on the rare occasions I want to use it. The secondary "Normal" pane gets changed to a "Progress Marquee" pane whenever it is in use and switched back to "Normal" once the progress is complete.
All the logic to interact with the statusbar is handled by one function and the logic to update the progress percent is pretty straight forward:
The issue I'm facing is that at random intervals, the percent pane becomes invisible again. The next time I call the above increment logic, it is invisible, so it makes it visible and increments. That in itself wouldn't be a big issue if it weren't for the fact that when it is made visible, it is back to zero percent. It doesn't retain where it was at and now the percentage cue is all out of whack.
A picture says a thousand words.
The "progress percent" pane I make invisible and only display it on the rare occasions I want to use it. The secondary "Normal" pane gets changed to a "Progress Marquee" pane whenever it is in use and switched back to "Normal" once the progress is complete.
All the logic to interact with the statusbar is handled by one function and the logic to update the progress percent is pretty straight forward:
// Is the percent pane visible?
//If Not, then make it visible.
//get the current value
//increment it by whatever number was passed in
//Set the new value.
The issue I'm facing is that at random intervals, the percent pane becomes invisible again. The next time I call the above increment logic, it is invisible, so it makes it visible and increments. That in itself wouldn't be a big issue if it weren't for the fact that when it is made visible, it is back to zero percent. It doesn't retain where it was at and now the percentage cue is all out of whack.
A picture says a thousand words.
Comments
In this instance, we're using the statusbar on the mdi, so it's actually initialised on the start of the application.
We don't ever reference panecount again, just modify the visibility of the percentpane.
Attached is the all the source code that directly interacts with the statusbar. You won't be able to compile it but I think it should be easy enough to follow the logic.
And within a readnext loop, we just make this call
Case mod(progresscnt, onePercent) = 0 // we've progressed a further one percent so update the progress percentage bar by an additional 1% Nv_Statusbar("PROGRESS", statusbar, 1)
Given how much of your code is coupled with your framework, the fastest way for me to get to the bottom of this might be to get a copy of your OI application. Email me to work out the details.