473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

progress bar controls in status.py

O/S - Windows XP Home with Service Pack 2
Vsn of Python: 2.4 (from ActiveState)

This question is with regard to the progress bar controls that are in
the file status.py. On my workstation, status.py is located in the:

c:\python24\lib\site-packages\pythonwin\pywin\dialogs\

folder.

The only modification I made to status.py was to the demo() method
where I added the type argument and then called either
StatusProgressDialog or ThreadedStatusProgressDialog. The modified
demo() method looks like this:

def demo(type):
if type == "threaded":
d = ThreadedStatusProgressDialog("A Demo", "Doing
something...")
else:
d = StatusProgressDialog("A Demo", "Doing something...")

import win32api
for i in range(100):
if i == 50:
d.SetText("Getting there...")
if i==90:
d.SetText("Nearly done...")
win32api.Sleep(20)
d.Tick()
d.Close()

Using the interactive window of PythonWin, when I do the following:
import status
status.demo('a') the results are:
- a progress bar with title 'A Demo' appears
- ticks appear within the progress bar
- the message changes from 'Doing something' to 'Getting there...' to
'Nearly done...'
- the progress bar no longer appears

Using the interactive window of PythonWin, when I do the following: import status
status.demo('threaded')

the results are:
- the cursor position stays immediately to the right of the ')'
character
- nothing appears on the screen
- about 10 seconds later the >>> appears, a progress bar control
appears with the title 'A Demo' and text 'Doing something'
- the progress bar remains visible until I close it by clicking on the
X in the top right corner

My questions are:
1) If I want the behavior of ThreadedStatusProgressDialog to emulate
the behavior of StatusProgressDialog, what changes must I make to
status.py to accomplish that? (assume that I want
ThreadedStatusProgressDialog to remain threaded, i.e. I'm not looking
for an answer along the lines of "if you want the behavior of
ThreadedStatusProgressDialog to emulate the behavior of
StatusProgressDialog, then have it call StatusProgressDialog.")
2) Can you offer any guidelines or rules of thumb regarding when one
would wish to use ThreadedStatusProgressDialog vs using
StatusProgressDialog?

Jul 18 '05 #1
0 1383

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eva | last post by:
hi, I have just managed to add a progress bar to my statusbar control. the problem i am having is that t appears in the far left as default. I want it to appear in the far right side of the...
6
by: Ragtimer | last post by:
I'm struggling my way through building an Access 2k application, learing how to do each step as I get to it .... in other words I'm pretty new at this ...... I'm running a series of processes...
2
by: Champika Nirosh | last post by:
Hi All, Is there a way to add a Progress bar or any other control to a Status bar? Nirosh.
4
by: aj | last post by:
Alan, you can achieve this by using XMLHttp Async functionality in a javascript file. Create an aspx page in which execute long running SQL query, then do an XMLhttp post to that page from a js...
2
by: Robert Smith | last post by:
Hello, I have a problem with my progress bar, as shown in the attached code, the values on the bar are incremented within a threaded timer event. The timer works fine and ticks all the way...
9
by: esakal | last post by:
Hello, I'm programming an application based on CAB infrastructure in the client side (c# .net 2005) Since my application must be sequencally, i wrote all the code in the UI thread. my...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
1
by: Ralph | last post by:
Okay I have a website where the user is going to hit a button to kick off a process that is going to take a long amount of time. Is there anyway without using AJAX, or possibly a windows control on...
10
by: =?Utf-8?B?YXVsZGg=?= | last post by:
am having a hard time wrapping my head around "backgroundworker" class and updates to the window form that calls it. i have some questions about how to update windows form controls. i have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.