mirror of https://github.com/kivy/kivy.git
Made explicit mention of a few examples in the narrative about selection.
This commit is contained in:
parent
7d45acc661
commit
aa75a62c89
|
@ -438,14 +438,18 @@ on_selection_change event::
|
||||||
|
|
||||||
list_adapter.bind(on_selection_change=callback_function)
|
list_adapter.bind(on_selection_change=callback_function)
|
||||||
|
|
||||||
where callback_function() does whatever is needed for the update.
|
where callback_function() does whatever is needed for the update. See the
|
||||||
|
example called list_master_detail.py, and imagine that the list one the left
|
||||||
|
would be a list of dog breeds, and the detail view on the right would show
|
||||||
|
details for a selected dog breed.
|
||||||
|
|
||||||
In another example, we could set the selection_mode of a listview to
|
In another example, we could set the selection_mode of a listview to
|
||||||
'multiple', and load it with a list of answers to a multiple-choice question.
|
'multiple', and load it with a list of answers to a multiple-choice question.
|
||||||
The question could have several correct answers. A color swatch view could be
|
The question could have several correct answers. A color swatch view could be
|
||||||
bound to selection change, as above, so that it turns green as soon as the
|
bound to selection change, as above, so that it turns green as soon as the
|
||||||
correct choices are made, unless the number of touches exeeds a limit, when the
|
correct choices are made, unless the number of touches exeeds a limit, when the
|
||||||
answer session would be terminated.
|
answer session would be terminated. See the examples that feature thumbnail
|
||||||
|
images to get some ideas, e.g., list_cascade_dict.py.
|
||||||
|
|
||||||
In a more involved example, we could chain together three listviews, where
|
In a more involved example, we could chain together three listviews, where
|
||||||
selection in the first controls the items shown in the second, and selection in
|
selection in the first controls the items shown in the second, and selection in
|
||||||
|
|
Loading…
Reference in New Issue