Using Icons In Listbox
Join the DZone community and get the full member experience.Join For Free
pys60 1.1.3 provide some graphics capabilitis. One of them is using icons in Listbox (code taken from pys60 API reference)
icon1 = appuifw.Icon(u"z:\\system\\data\\avkon.mbm", 28, 29) icon2 = appuifw.Icon(u"z:\\system\\data\\avkon.mbm ", 40, 41) entries = [(u"Signal", icon1), (u"Battery", icon2)] lb = appuifw.Listbox(entries, lbox_observe)Listbox is one of the 3 types that can be assigned to app.body (i.e. Text, Listbox, Canvas) So, to make code above able to run, you must add
appuifw.app.body = lband the function lbox_observe that will handle the selection need to be defined.
Opinions expressed by DZone contributors are their own.