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

edited February 2023 in SRP StatusBar Control
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:
// 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.


  • Sorry for the delayed response. I've added this issue to my list, but I'm in the process of a major update to the controls and won't be able to give you a fix until that update is complete. I'll be sure to look at it as soon as I can.
  • I am unable to recreate this thus far using the pseudocode you provided. I am going to need more information to in order to isolate this. Is there a chance you are changing the PaneCount property somewhere on your form?
  • Nope. Panecount is only referenced once in the entire application and that's as the first property in the initialisation of any statusbar, which is always called on the create of the form.
    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)
  • I had to significantly strip down your code to remove all your application dependencies. The method.progress routine seems to behave fine in my test, but I noticed that you offer the option to show a cancel button using, I'm guessing, the SRP Popup Control. Is this cancel button active in when you observe the issue?

    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.
Sign In or Register to comment.