I have a problem with the scrolling listbox in S60v5,
when I move the listBox with the fingers (without the pad) the screen dont refresh and I always see the same items:
this is code I use:
Code:import appuifw, e32 from key_codes import * app_lock = e32.Ao_lock() #Define the exit function def quit(): app_lock.signal() appuifw.app.exit_key_handler = quit #The list of entries items = [u"1", u"2", u"3", u"4", u"4", u"5", u"6", u"7", u"8", u"9", u"10", u"11", u"12", u"13", u"4", u"15"] #long list #Define the function for the arrow keys def move(direction): if direction == 'right': if lb.current() == len(items) - 1: lb.set_list(items, 0) else: lb.set_list(items, lb.current() + 1) elif direction == 'left': if lb.current() == 0: lb.set_list(items, len(items) - 1) else: lb.set_list(items, lb.current() - 1) #Create an instance of Listbox and set it as the application's body lb = appuifw.Listbox(items, lambda:None) appuifw.app.body = lb #Bind the keys lb.bind(EKeyRightArrow, lambda:move('right')) lb.bind(EKeyLeftArrow, lambda:move('left')) app_lock.wait()

Reply With Quote

