×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    5

    pys60 - \n like a square with text in Canvas!

    My Configuration:

    python 2.5
    pys60 2.0.0
    emulator for s60
    windows xp

    In my file .py there are a lot string with \n
    But canvas draw the \n like a square!

    Code:
    ...  
    var_string = "Nel mezzo del cammin di nostra vita \n mi ritrovai per una selva oscura ."  
    var_string = unicode(var_string)
    ...  
    canvas.text((40,60), var_string, 0x007F00, font=(u'Nokia Hindi S60',45,appuifw.STYLE_BOLD))  
    ...
    there is a solution?
    bye!
    Last edited by dennyb87; 2011-01-19 at 17:30.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,557

    Re: pys60 - \n like a square with text in Canvas!

    Split your string at the \n and print them separately below each other yourself "manually" (the \n won't work as a newline character like that, and it is printed as a square because the font does not have a glyph/symbol for it).

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    5

    Re: pys60 - \n like a square with text in Canvas!

    Thank you very much for the answer!
    bye!

Similar Threads

  1. Replies: 1
    Last Post: 2010-08-12, 17:57
  2. textbox in canvas using PyS60
    By rabeehkm in forum Symbian
    Replies: 1
    Last Post: 2009-06-02, 13:21
  3. Changing canvas flashing issue ON PYS60
    By Alpinet in forum Symbian
    Replies: 1
    Last Post: 2008-05-31, 14:50
  4. Problem Editing text in Series 60 editor square
    By CristianMoron in forum Symbian
    Replies: 1
    Last Post: 2004-04-30, 09:47
  5. Problem Editing text in Series 60 editor square
    By CristianMoron in forum Symbian
    Replies: 0
    Last Post: 2004-04-30, 09:25

Posting Permissions

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