Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 01:10, 31 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Progress bar on S60 5th Edition using PySymbian

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
S60 5th Edition
Created: croozeus (10 Oct 2008)
Last edited: hamishwillee (31 May 2013)



Now that we can use PySymbian on the S60 5th Edition SDK (link), here is a small code snippet which creates a progress bar in Python. A progress bar is a component in a graphical user interface used to convey the progress of a task, such as a download or file transfer. This code can also be used with earlier S60 editions.

Code Snippet

In the below code, the progress bar advances 10% at every second. However, it can be adapted to various events such as download time or any other timed process.

#import modules
import appuifw, e32, graphics, sysinfo
# defining the exit handler
def quit():
#setting application title"Progress Bar"
#setting the screen size"normal"
#define image resolution
[1]/2+20)), outline=(0,0,0))
def hr(rect):canvas.blit(img)
#Increment the progress bar by 10% every second.
for i in range(10):
img.rectangle(((p,sysinfo.display_pixels()[1]/2-20),(p+(sysinfo.display_pixels()[0]-40)/10,sysinfo.display_pixels()[1]/2+20)), fill=0)
print i
app_lock = e32.Ao_lock()

Post Conditions

Progressbar 5th 1.jpg Progressbar 5th 2.jpg

  1. Progress bar with 40% progress
  2. Progress bar with 100% progress

See Also


This page was last modified on 31 May 2013, at 01:10.
76 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.