PyS60 :在列表中使用图标



import appuifw
import e32
 
# Indeces from Symbian\9.1\S60_3rd_MR\Epoc32\include\avkon.mbg file
EMbmAvkonQgn_prop_signal_icon = 16412
EMbmAvkonQgn_prop_signal_icon_mask = 16413
EMbmAvkonQgn_prop_battery_icon = 16424
EMbmAvkonQgn_prop_battery_icon_mask = 16425
 
ICON_FILE = u"z:\\resource\\apps\\avkon2.mif"
 
def clean():
    lock.signal()
 
icon1 = appuifw.Icon(ICON_FILE,
                     EMbmAvkonQgn_prop_signal_icon,
                     EMbmAvkonQgn_prop_signal_icon_mask)
icon2 = appuifw.Icon(ICON_FILE,
                     EMbmAvkonQgn_prop_battery_icon,
                     EMbmAvkonQgn_prop_battery_icon_mask)
 
entries = [(u"Signal", u"Strong", icon1),
           (u"Battery", u"Full", icon2)
          ]
lb = appuifw.Listbox(entries)
 
appuifw.app.body = lb
 
lock=e32.Ao_lock()
appuifw.app.exit_key_handler=clean
lock.wait()

你可能感兴趣的:(Symbian,Nokia)