Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Show All Icons In Avkon.mbm

DZone's Guide to

Show All Icons In Avkon.mbm

·
Free Resource
There are 2 type of mbm files. The following code work with
ROM-type (most mbm on Z:\) only.

>>> 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
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}