×

Discussion Board

Results 1 to 5 of 5

Thread: Digital clock

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    45

    Unhappy Digital clock

    hi all,

    I have a problem of Display Digital Clock in Canvas mode,

    i got a source code but it uses Image to Display Digital Clock

    im = Image.createImage(80,60);
    Graphics g = im.getGraphics();
    g.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, ont.SIZE_LARGE));
    g.drawImage(im,70,70,Graphics.TOP);
    g.drawString(getTime(),canvas.getWidth(),canvas.getHeight(),g.LEFT|g.TOP);
    canvas.setImage(im);

    this is code but i don't want clock on Image ,I want to display it directly on canvas(Top/bottom of Canvas);

    any help;

    Deepak

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Digital clock

    hi Deepak,

    you haven't posted relevant code (what is "setImage(...)"?),
    if you are drawing on canvas just couuld use drawString method with correct x/y and anchor (discussed in Canvas description in MIPD docs),

    regards,
    Peter

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Digital clock

    May be this sample app is of some interest to you!

    Digital Clocks
    http://koti.mbnet.fi/oddball/softwar...italclock.html

    Regards
    Gopal

  4. #4
    Registered User
    Join Date
    Jan 2006
    Posts
    45

    Re: Digital clock

    Quote Originally Posted by peterblazejewicz
    hi Deepak,

    you haven't posted relevant code (what is "setImage(...)"?),
    if you are drawing on canvas just couuld use drawString method with correct x/y and anchor (discussed in Canvas description in MIPD docs),

    regards,
    Peter

    but drawstring is call by using paint(Graphics g) function i want it without paint function

    is it possible?????

  5. #5
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Digital clock

    Hi,

    R u planning to display it in a form. then u can use string item to display it.

    regards,
    wang

Similar Threads

  1. about analog and digital clock
    By kmsoomro in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-05-12, 09:11
  2. N90 - closed mode digital clock display distraction
    By lkraav in forum General Development Questions
    Replies: 4
    Last Post: 2006-04-20, 20:51
  3. about the analog and digital clock
    By kmsoomro in forum Symbian
    Replies: 0
    Last Post: 2006-03-02, 10:31
  4. How to disply Digital clock without R_AVKON_STATUS_PANE_LAYOUT_IDLE
    By jkekoni in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-11-12, 14:32
  5. digital clock screen saver
    By cyfan in forum Mobile Java General
    Replies: 1
    Last Post: 2004-02-09, 07:30

Posting Permissions

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