You are using
SelectedIndex
property of your
ListBox
-es.
For single-selection
ListBox
this is fine but for multi-selection
ListBox
you have to use
SelectedIndices
and/or
SelectedItems
properties.
Check out the documentation of
ListBox.SelectedIndex[
^] and read the remarks section. There you will find useful information and links.
:)