Custom Search

Sunday, January 3, 2010

PyS60 Tutorial - setting the application's body

PyS60 Tutorial - setting the application's body

-------------------------------------------------------------------

Setting the application's body to Text

/************ Complete Source Code Start *************/

import appuifw, e32

def quit():

app_lock.signal()

appuifw.app.exit_key_handler=quit

text1=appuifw.Text()

appuifw.app.body=text1

text1.add(u"Hello how are You")

app_lock=e32.Ao_lock()

app_lock.wait()

/************ Complete Source Code End *************/

/*********** Description Start *************/

import appuifw, e32

#Define the exit function

def quit():

app_lock.signal()

appuifw.app.exit_key_handler=quit

# Creating object 'text1' of Text Type.

text1=appuifw.Text()

# Setting default body of the application to 'text1'.

appuifw.app.body=text1

#To write text in unicode at the current position of the cursor:

text1.add(u"Hello how are You")

app_lock=e32.Ao_lock()

app_lock.wait()

/*********** Description End *************/

No comments:

Post a Comment