#Tabs
#You can set tabs in the application to allow quick switching between views
import appuifw, e32
#Define the exit function
def quit():
app_lock.signal()
appuifw.app.exit_key_handler=quit
#We define the applications for each tab:
application1=appuifw.Text(u"This is application 1")
application2=appuifw.Text(u"This is application 2")
application3=appuifw.Text(u"This is application 3")
#Create the function that switches between tabs
def tab_handler(index):
global lb
if(index==0):
appuifw.app.body=application1 # switch to application 1
if(index==1):
appuifw.app.body=application2 # switch to application 2
if(index==2):
appuifw.app.body=application3 # switch to application 3
#Now we set the application's tabs
appuifw.app.set_tabs([u"One", u"Two", u"Three"], tab_handler)
#And we specify that the tab that is displayed first is tab #1
appuifw.app.body=application1
app_lock=e32.Ao_lock()
app_lock.wait()
#You can set tabs in the application to allow quick switching between views
import appuifw, e32
#Define the exit function
def quit():
app_lock.signal()
appuifw.app.exit_key_handler=quit
#We define the applications for each tab:
application1=appuifw.Text(u"This is application 1")
application2=appuifw.Text(u"This is application 2")
application3=appuifw.Text(u"This is application 3")
#Create the function that switches between tabs
def tab_handler(index):
global lb
if(index==0):
appuifw.app.body=application1 # switch to application 1
if(index==1):
appuifw.app.body=application2 # switch to application 2
if(index==2):
appuifw.app.body=application3 # switch to application 3
#Now we set the application's tabs
appuifw.app.set_tabs([u"One", u"Two", u"Three"], tab_handler)
#And we specify that the tab that is displayed first is tab #1
appuifw.app.body=application1
app_lock=e32.Ao_lock()
app_lock.wait()