×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    17

    What code for using the original phone screen background as your background

    My code always display the default white screen background?
    How do I change the default white background to a transparent backround to show the phone's original background for eg during menu selection a blue background with beautiful shapes/circles? Help is needed.Thks.

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

    Re: What code for using the original phone screen background as your background

    Do you mean show an image as background? If so, it is done like this:

    Code:
    bgimage=Image.open("C:\\Python\\myimage.jpg")
    # where myimage.jpg is the image you want ot use
    
    def handle_redraw(rect):canvas.blit(bgimage)
    canvas=appuifw.Canvas(event_callback=None, redraw_callback=handle_redraw)
    appuifw.app.body=canvas

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    17

    Re: What code for using the original phone screen background as your background

    Thks.
    I wish not to show my image.jpg as the background and not a default python white background display but an empty background .

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    115

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by ComThink View Post
    My code always display the default white screen background?
    How do I change the default white background to a transparent backround to show the phone's original background for eg during menu selection a blue background with beautiful shapes/circles? Help is needed.Thks.
    I know it's possible as I've seen a few apps with it in but not seen the code. Maybe it reads the theme and writes the image?

  5. #5
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by ComThink View Post
    Thks.
    I wish not to show my image.jpg as the background and not a default python white background display but an empty background .
    There are no theme aware UI functions for PyS60 Canvas.
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

  6. #6
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by miohtama View Post
    There are no theme aware UI functions for PyS60 Canvas.
    Anybody capable enough at C++ willing to make an extension? It would be nice to have a few basic functions at first:

    - clear the screen (that would allow the default themed background)
    - return the default font color

    Well, not exactly rocket sience, eh?

  7. #7
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: What code for using the original phone screen background as your background

    I'm not sure, but try this:

    Code:
     appuifw.app.body = None

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

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by ComThink View Post
    Thks.
    I wish not to show my image.jpg as the background and not a default python white background display but an empty background .
    hi ComThink
    your idea of setting a transparent background is very nice. But as far as i think we have to write a extension in native c++ for it. hope somebody writing a extension for that kind of background.
    thanx

  9. #9
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,795

    Re: What code for using the original phone screen background as your background

    Hi,

    Have you seen PED?
    It has such an implementation already using Pys60

    So I think the author y.a.k may be able to give you tips on the same.
    You could search the forum for the author and drop him an email about the same!

    Best Regards
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  10. #10
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by croozeus View Post
    Hi,

    Have you seen PED?
    It has such an implementation already using Pys60
    Really? I didn't notice. And where does PED use it?
    If You mean the listbox (choosing the file), it's
    already transparent without any tricks.

  11. #11
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    Re: What code for using the original phone screen background as your background

    Quote Originally Posted by Dansco View Post
    I know it's possible as I've seen a few apps with it in but not seen the code.
    Of course it's possible (in C++). For python we are left with tricks that are not guaranteed to work in all cases. Until someone writes an extension.

    To be honest, I think the functions of clearing the screen and retrieving the default font color should be in the core distribution. So instead of the arbitrary defaults (black text on white canvas), it should be the theme's default color text on the theme's default background.

    Oh, and a function for the theme's default highlight rectangle would also be nice

    PS I've added this as a feature request on the pys60 tracker
    Last edited by nokia_e70; 2008-03-28 at 07:51.

  12. #12
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,795

    Smile Re: What code for using the original phone screen background as your background

    Quote Originally Posted by nokia_e70 View Post
    Really? I didn't notice. And where does PED use it?
    If You mean the listbox (choosing the file), it's
    already transparent without any tricks.
    Yes, PED had used this feature in one of the releases.

    Attached is a screenshot from my 6680 (2nd Ed) which shows the implementation.

    Moreover, the version of PED that I have installed on my N95 (3rd Ed) doesn't have that feature.

    Best Regards
    Croozeus
    Attached Images Attached Images
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. OMA DRM media transfer using PC to Phone using USB
    By venky123 in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2008-08-13, 03:02
  2. Replies: 2
    Last Post: 2007-11-10, 13:19
  3. How to draw directly to the phone screen
    By preethi in forum Symbian
    Replies: 2
    Last Post: 2007-10-15, 13:16

Posting Permissions

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