DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Using Icon As Image

  • submit to reddit
        Pys60 1.1.3 have 2 differnt classes for graphics data.
Icon class represents icon (typically from .mbm file)
which can be put in ListBox for selection.
Image class represents a bigger image which can be
drawn upon. These 2 classes can't convert to/from
each other.

So, I create a library that read .mbm file and draw
an Image from the data there. So, you can make
an icon into an image (now only 1-bit icons).
the module can be downloaded from here
from appuifw import *
import icon_image, e32

app.body = c = Canvas()
# choose a bitmap from plenty inside mbm (multi-bitmap)
icon = icon_image('z:\\system\\data\\avkon.mbm', 28) 

e32.ao_sleep(10)  # 10 sec to end program
Look here for more information.