Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2004

    Problem viewing text in canvas

    Good day.

    I've tried to use Canvas for wiewing long text in midp application.
    I'm using drawString() method of class Graphics.

    For calculating the substring viewed horizontally a screen I'm using the method stringWidth() of class Font.
    The font is:
    Font f = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);

    In some phones the rows are clipped.
    I've tried using Font.FACE_MONOSPACE and / or Font.SIZE_SMALL but with the same result.

    Debuging code I've seen that the value calculate from stringWidth() method id less than the with of the screen, but really is clipped.


    Best regards and good work.

    Stefano Errani

  2. #2
    Super Contributor
    Join Date
    Mar 2003

    Re: Problem viewing text in canvas

    This might sound silly but it's better to be sure:
    Are you remembering to set the Font you use in the calculation as the active font for the Graphics context (ie, Graphics.setFont())?


  3. #3
    Registered User
    Join Date
    Jul 2004

    Re: Problem viewing text in canvas

    Not I don't.

    Tnx a lot.

    Stefano Errni

Similar Threads

  1. Problem showing the SMS body text on RichText Editor
    By saadmansur in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-06-21, 11:30
  2. Partly dynamically setting list problem
    By kaiten-sushi in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-05-09, 16:22
  3. Writing text on the canvas
    By madmartygan in forum Symbian
    Replies: 1
    Last Post: 2006-03-03, 02:48

Posting Permissions

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