You Are Here:

Community: Developer Discussion Boards

#1 Old problem with canvas.text and appuifw.text - 2006-10-28, 15:37

Join Date: Oct 2006
Posts: 10
luke14free
Offline
Registered User

hi,
I have big problem with a code...
I have 2 questions:
1)how could I inserite 2 appuifw.text in one appuifw.body?(i mean that I cant put 2 static text in just one body...)
2)how can I use the canvas to put the text in a program?
i did that code, if you can please help me to correct this:


import appuifw
appuifw.app.screen='large'
appuifw.body=canvas=appuifw.Canvas()
canvas.clear()
canvas.text( (2,12), u'Text')
canvas.text( (2,24), u'by luke14free')
def alfa():
global a
a='alfa'
def write():
canvas.text( (2,36), a)#the global a into the canvas.text



my phone is 6630;
(s60,2nd generation symbian 8.0)
thank yuo nokia python s60 comunity


Reply With Quote

#2 Old Re: problem with canvas.text and appuifw.text - 2006-11-01, 10:43

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by luke14free
hi,
I wish you Luke a friendly welcome to this Forum
Quote:
I have big problem with a code...
I have 2 questions:
1)how could I inserite 2 appuifw.text in one appuifw.body?(i mean that I cant put 2 static text in just one body...)
No , you can't You can only use one widget (Text,List or Canvas ) in the application body. Look at the official doc ...
Quote:
2)how can I use the canvas to put the text in a program?
i did that code, if you can please help me to correct this:

Code:
# corrected example
a=u'alfa'

import appuifw
appuifw.app.screen='large'
appuifw.body=canvas=appuifw.Canvas()
canvas.clear()
canvas.text( (2,12), u'Text')
canvas.text( (2,24), u'by luke14free')
canvas.text( (2,36), a)#the global a into the canvas.text

my phone is 6630;
(s60,2nd generation symbian 8.0)
thank yuo nokia python s60 comunity
More canvas examples here

PS : Next time put your example code between code tag for keeping code indentation


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Count chars on appuifw.Text and show it like when you create SMS adywicaksono Python 1 2006-05-25 03:51
Formating color, style appuifw.Text not work adywicaksono Python 3 2006-05-03 07:39
appuifw.text font pimol Python 5 2006-02-26 12:09
Does appuifw.Text input support normal text? bercobeute Python 2 2006-02-22 09:43
appuifw.Text() bug ? sznever Python 2 2005-07-05 15:31

Rate This

 
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