×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    10

    problem with canvas.text and appuifw.text


    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



  2. #2
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: problem with canvas.text and appuifw.text

    Quote Originally Posted by luke14free
    hi,
    I wish you Luke a friendly welcome to this Forum
    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 ...
    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 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

Similar Threads

  1. Replies: 1
    Last Post: 2006-05-25, 02:51
  2. Formating color, style appuifw.Text not work
    By adywicaksono in forum Symbian
    Replies: 3
    Last Post: 2006-05-03, 06:39
  3. appuifw.text font
    By pimol in forum Symbian
    Replies: 5
    Last Post: 2006-02-26, 11:09
  4. Does appuifw.Text input support normal text?
    By bercobeute in forum Symbian
    Replies: 2
    Last Post: 2006-02-22, 08:43
  5. appuifw.Text() bug ?
    By sznever in forum Symbian
    Replies: 2
    Last Post: 2005-07-05, 14:31

Posting Permissions

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