Progress Bar

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Progress Bar

Brennan Williams
Is it possible to change the maximum value of a ProgressEditor once it
is displayed in a view?
I suppose I could instead change the value of what I'm displaying in the
progress bar? i.e. have a fixed min and max of say 0,1000 and then if I
know my count is going to be 0...1650 then I could scale my count by
1000/1650?

Thoughts?

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Progress Bar

bryce hendrix-2
Changing the max value is perfectly valid, though if you're going to do
that often, I suggest switching to an indefinite progress bar (the kind
where it just bounces back an forth) and changing the text of the
progress bar at each big step.

Bryce

On 4/6/2010 10:15 PM, Brennan Williams wrote:

> Is it possible to change the maximum value of a ProgressEditor once it
> is displayed in a view?
> I suppose I could instead change the value of what I'm displaying in the
> progress bar? i.e. have a fixed min and max of say 0,1000 and then if I
> know my count is going to be 0...1650 then I could scale my count by
> 1000/1650?
>
> Thoughts?
>
> Brennan
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>    

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Progress Bar

Brennan Williams
Bryce Hendrix wrote:
> Changing the max value is perfectly valid, though if you're going to
> do that often, I suggest switching to an indefinite progress bar (the
> kind where it just bounces back an forth) and changing the text of the
> progress bar at each big step.
>
Couple of things I'm noticing with ProgressEditor

show_percent is not implemented

show_time=True is giving me an AttributeError in
pyface/ui/wx/progress_editor.py line 147 ...
AttributeError: 'ProgressDialog' object has no attribute '_start_time'

And looking at the code, to get it to just bounce backwards and forwards
you set max=0

As I'm just using it in its simplest mode, it is working ok for me.

Brennan

> Bryce
>
> On 4/6/2010 10:15 PM, Brennan Williams wrote:
>> Is it possible to change the maximum value of a ProgressEditor once it
>> is displayed in a view?
>> I suppose I could instead change the value of what I'm displaying in the
>> progress bar? i.e. have a fixed min and max of say 0,1000 and then if I
>> know my count is going to be 0...1650 then I could scale my count by
>> 1000/1650?
>>
>> Thoughts?
>>
>> Brennan
>>
>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>    
>
>


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Progress Bar

bryce hendrix-2
On 04/07/2010 04:32 PM, Brennan Williams wrote:

> Bryce Hendrix wrote:
>    
>> Changing the max value is perfectly valid, though if you're going to
>> do that often, I suggest switching to an indefinite progress bar (the
>> kind where it just bounces back an forth) and changing the text of the
>> progress bar at each big step.
>>
>>      
> Couple of things I'm noticing with ProgressEditor
>
> show_percent is not implemented
>    

I think the implementation got lost at one point, it should be very
simple to fix.

> show_time=True is giving me an AttributeError in
> pyface/ui/wx/progress_editor.py line 147 ...
> AttributeError: 'ProgressDialog' object has no attribute '_start_time'
>    

This one is a bit strange, the attribute gets set in the open() method.
My guess is you tried to update the progress bar before opening it. I've
commited code to initialize it in __init__ to zero.

> And looking at the code, to get it to just bounce backwards and forwards
> you set max=0
>    

That is expected, for cases where you don't know how many steps you need.

Bryce
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev