Ticket #14743 (confirmed enhancement)
Add wxBusyInfo::UpdateText()
| Reported by: | ghostvoodooman | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | GUI-all | Version: | 2.9-svn |
| Keywords: | wxBusyInfo progressbar percent simple | Cc: | |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
I am using wxBusyInfo.
I have code like (pseudo code)
wxBusyInfo* busy=new wxBusyInfo( text representing "initializing 0.000%" );
while(...) {
if( old_time!=time(NULL) ) {
delete busy;
busy=new wxBusyInfo( text representing `all/100.0F*progress` "%" );
old_time=time(NULL);
}
do_expensive_work();
}
delete busy;
to display information message of the progress in percent's.
This is leading to flickering wxBusyInfo. There is no big deal, I don't mind.
I'd like to have in constructor of wxBusyInfo flag like "bool no_text_but progress_bar = false".
When the coder instantiate this flag with "true", it will ignore the text displayed, but will show progress bar (optionally under progress bar to display the text), and the progress bar could be update-able via function like
update_progress(const float progress); // progress in range 0.0F to 1.0F
Side note: It would be nice to call function like:
update_busy_text("100%. Please, wait, finishing.");
to update the wxBusyInfo's text w/o re-creating the wxBusyInfo class instance.
I know I could make a custom window/frame/panel that would show progress bar, but this improvement would make wxBusyInfo much more convenient and much more simple for wxWidgets user to use.
I have googled for "wxbusyinfo progressbar" (w/o quotes), but I have only found this site: http://www.blitzbasic.com/Community/posts.php?topic=87606 which is actually telling nothing about such improvement/patch/code.
On Windows Vista, there are in system utilities progress bars that are showing moving green bar from left to right and cycling this animation indefinitely, until operation is done. Here, I am speaking of "real" progress bar, that displays real progress in percent's, visually.
