PowerBuilder 不确定进度条
我有一个从 PB 应用程序调用的运行时间较长的存储过程。我希望 UI 显示正在处理的指示器,但我不知道确切的进度。也就是说,我不能说它是完成了10%还是90%。我只知道什么时候完成。
为了给用户一些可看的东西,我想在窗口的某处放置一个“不确定”(水平)进度条。我查看了内置 HProgressBar 控件的文档,但没有看到如何强制执行此行为。
除了编写自己的控件或导入另一个控件之外,有没有办法实现这一点?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Powerbuilder 不包含执行此操作的内置方法,但您可以使用 Win32 控件。这里有一篇关于此的好文章(其中包括进度条的示例!):
这是一篇较旧的文章,但它仍然适用于较新版本的 Powerbuilder。
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.
有点难以控制的情况。由于 PowerBuilder 不是多线程的,因此当存储过程运行时,应用程序 UI 将无法正确更新。
它必须等待操作完成才能返回控制权。
过去,我显示了一个动画来说明正在进行长时间运行的操作。如果您使用动画控制,它将在 SP 运行时继续播放。
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.