×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Help on display to canvas..

    Hi everyone,
    I'm trying to display a sensor(potentiometer) reading from PC thru bluetooth with my phone Nokia5500. I use the ff. code to read..
    Code:
    for c in range(1,6):
        r=sock.read()
        if r=='\n':
          buf=''
          r=''
        else:         
          buf+=r
        print buf
    I am able display the reading(in series) on the screen using bluetooth.
    My question is how can I make it Center on the screen and use large font and use background color, and where do I place this code.

    thanks in advance,
    picuser

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Help on display to canvas..

    hello picuser

    if i got your properly you need to display the text correctly on canvas then i will recommend you to go through this article at the wiki.

    Regards,

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Help on display to canvas..

    http://wiki.forum.nokia.com/index.php/How_to_use_Canvas
    You should also check out the documentation for the text and measure_text methods:
    http://pys60.garage.maemo.org/doc/s60/node37.html

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Re: Help on display to canvas..

    Hi, thanks for the link, its perfect. but I noticed that it displays only the first data, I tried to send 5 entries but it only displays the first one...pls help.


    regards,
    picuser

  5. #5
    Registered User
    Join Date
    Jul 2008
    Location
    Bhavnagar (India)
    Posts
    112

    Re: Help on display to canvas..

    Quote Originally Posted by picuser View Post
    Hi everyone,
    My question is how can I make it Center on the screen and use large font and use background color, and where do I place this code.

    thanks in advance,
    picuser
    Hi Picuser,

    To disaplay text on center of the screen, this thread will help you.

    Regards,
    - Chintan Umraliya

  6. #6
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Re: Help on display to canvas..

    Hi guys, thanks very much for the support, I got it now . But can I ask one thing, how can I draw a circle and a pointer? Similar to a gauge...

    thanks in advance,
    picuser

  7. #7
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Help on display to canvas..

    The shapes you can draw on a canvas are described in the page I linked to earlier (the documentation). Just experiment with those functions.

Similar Threads

  1. is it possible to draw a line over videocontrol in a canvas?
    By byronlilu in forum Mobile Java General
    Replies: 13
    Last Post: 2008-11-28, 11:58
  2. cannot create canvas
    By mohd_izzuan in forum Mobile Java General
    Replies: 2
    Last Post: 2006-03-03, 02:30
  3. cannot jump from canvas back to form
    By prakala in forum Mobile Java General
    Replies: 1
    Last Post: 2003-05-23, 02:47
  4. Changing display from canvas to form
    By Danack in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2003-05-14, 10:00
  5. Display question ...
    By kapot in forum Mobile Java General
    Replies: 0
    Last Post: 2002-10-14, 22:09

Posting Permissions

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