
.Remove method for ImageList produces error
: Does anyone have any insight into this behavior ? I have a ListView with 2
: ImageLists bound to the ListView (1 for small icons, 1 for large icons). At
: runtime I can ImageList.Add things to the ImageList's, but when I try to
: ImageList.Remove the same things I get an error "Can't modify ImageList
: when bound to another control". The error message says I can't "modify" the
: ImageList, although I can .Add things. So, what gives ??
I don't know for certain, but the "modify" probably refers to the image
indices. Adding an image doesn't change the existing indices since it is
simply appended to the end of the list. However, removing an item could alter
the indices and mess up the controls that are bound to it.
-Patrick