You Are Here:

Community: Wiki

 

Talk:Basic framework for creating user interface

From Forum Nokia Wiki

Splash Screen

I've written a little class to be used as a Splash Screen, based on Dialog class:

class Splash(Dialog):
def __init__(self, cbk, filename, timer, timeout):
try:
self.splash_img = Image.open(filename)
self.canvas = Canvas(redraw_callback = self.handle_redraw)
Dialog.__init__(self, cbk, u"", self.canvas)
app.screen = 'full'
self.refresh()
timer.after(timeout)
self.close_app()
del self.splash_img
del self.canvas
except:
pass
 
def handle_redraw(self, rect):
self.canvas.blit(self.splash_img)

Usage example:

main_timer = Ao_timer()
 
def cbk_splash():
return True
 
#Display my_image.jpg for two seconds
Splash(cbk_splash, u"c:\\my_image.jpg", main_timer, 2)

--Javsmo 23:25, 10 March 2009 (GMT-3)


This article very-well represents the basic framework to create an user interface in python. The basic elements of user interface are menu, submenu, dialogues etc. The article presents the approach to create these User interface elements.

All the information presented here is in a very detailed and well-organized manner, so that beginners can understand it with little effort. Every code snippest has related description and scrren shots. Though the information is simple and primary, it is very essential requirement for any application. So the article also secures its importance for developers.

This article is specially meant for beginners to help them in creating these basic elements of user-interface and give them detailed explaination.

--Deepikagohil 17:05, 20 September 2009 (UTC)


 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia