2
votes

I have a somewhat-long-running stored procedure being called from a PB application. I want the UI to show an indicator that it is processing, but I don't know the exact progress. That is, I can't say whether it is 10% or 90% done. All I know is when it is done.

To give the user something to look at I'd like to put a "Inderterminate" (horizontal) progress bar on the window somewhere. I've looked at the documentation for the built-in HProgressBar control and don't see how to force this behavior.

Short of writing my own control or importing another one, is there a way to accomplish this?

2

2 Answers

2
votes

Powerbuilder doesn't include a built-in way to do this, but you can use the Win32 controls. There is a good article on this (which includes an example of progress bars!) here:

It's an older article but it still applies to the newer versions of Powerbuilder.

0
votes

Somewhat of a difficult situation to control. Since PowerBuilder is not multi-threaded the application UI won't be able to update properly when the stored procedure is running.

It will have to wait for the operation to complete before control is returned.

In the past, I've displayed an animation to illustrate that a long running operation is in progress. If you use the animation control it will continue to play while the SP running.