Progress Bar automatic increment

Hi All,

I have developed an application in Python and the UI is
developed in BOA constructor. I have placed a gauge(Progress Bar) on the frame
to let user know much of processing is done. With my observation, I have
noticed that the application takes about 50 seconds to complete the entire
processing. I want the Progress bar to automatically increment along with the
time taken for processing. What I mean is that: Progress bar value should be set
to 0 at the start, 25% when the processing is 1/4th done , 50% at
half stage and so on. Finally it should be set to 100% at the completion.

I don’t want to set the increment manually at various places
in my code.

Is this possible?

Regards,

Rajendra

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Hi,

I have developed an application in Python and the UI is developed in BOA
constructor. I have placed a gauge(Progress Bar) on the frame to let user
know much of processing is done. With my observation, I have noticed that
the application takes about 50 seconds to complete the entire processing. I
want the Progress bar to automatically increment along with the time taken
for processing. What I mean is that: Progress bar value should be set to 0
at the start, 25% when the processing is 1/4th done , 50% at half stage and
so on. Finally it should be set to 100% at the completion.

I don't want to set the increment manually at various places in my code.

Is this possible?

Yes:

1) Set up a thread that does your lengthy processing;
2) In the wxPython thread (the main one), start the progress bar and a
timer, which will update your progress bar every seconds (or whatever
you decide).

If you want to set up your progress bar to display 25% at 1/4th of the
process and so on, you need to know what "1/4th" of the process mean
and update your progress bar accordingly.

See here for more ideas:

http://wiki.wxpython.org/LongRunningTasks

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Thu, Oct 16, 2008 at 1:01 PM, Rajendra Arvind Gai wrote:

1 Like