2017-01-19 14 views
0

Im folgenden kv Abschnitt:Wo binden ListAdapter Auswahländerung in .kv

TabbedPanelItem: 
     id: tab2 
     text: 'VIEW' 
     on_press: root.viewInit() 
     ListView: 
      id: view_list 
      adapter: 
       ListAdapter(
       data= root.valid_views, 
       selection_mode='multiple', 
       allow_empty_selection=True, 
       cls=ListItemButton) 

Wo füge ich on_selection_change: root.somefunc() die Auswahl Änderungsereignis in ListAdapter zu binden und zu fangen?

Antwort

0
TabbedPanelItem: 
     id: tab2 
     text: 'VIEW' 
     on_press: root.viewInit() 
     ListView: 
      id: view_list 
      adapter: 
       ListAdapter(
       data= root.valid_views, 
       selection_mode='multiple', 
       allow_empty_selection=True, 
       cls=ListItemButton, 
       on_selection_change = root.somefunc()) 
Verwandte Themen