Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 20:18, 14 October 2007.

How to view icons in a mbm file

From Forum Nokia Wiki


Python has an icon type but note that currently appuifw.Icon can only be used with Listbox! So you need this code for viewing icons contained in a mbm file in a Listbox.

from appuifw import *
avkon = u'z:\\system\\data\\avkon.mbm'
def showicon(id_list, maskfunc=lambda x:x):
     if type(id_list) == int:
         id_list = [id_list] # one item
     entries = []
     if type(maskfunc) == dict:  # allow dict as a func
         func = lambda id: maskfunc.get(id,id)
     else:
         func = maskfunc
     for id in id_list:
         item = u'%s, %s' % (id, func(id))
         icon = Icon(avkon, id, func(id))
         entries.append((item, u'', icon))
     app.body = Listbox(entries, lambda: None)
 
showicon(range(503))  # all icons, including mask
showicon(range(0,100,2), lambda x:x+1)  # first 50 icons, with their mask brother
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZpythonQ
     qfnZtopicQUqfnTopicZseriesE5f60Q
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX